Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion factorio
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ function install(){
fi

# parse the response
if filename=$(echo "${httpresponse}" |grep -oP '(?<=^location: )[^\?]+' |grep -oP 'factorio_headless.+'); then
if filename=$(echo "${httpresponse}" |grep -oP '(?<=^location: )[^\?]+' |grep -oP 'factorio-headless.+'); then
Copy link

@vadcx vadcx Nov 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- is a special character in PCRE (Perl regex): 'factorio-headless.+'

The following will allow both to co-exist: 'factorio[_-]headless.+'

UPD: huh, - works fine on its own nonetheless 😮

debug "Found, latest version: '${filename}'"
else
debug "${httpresponse}"
Expand Down