[Linux] Fix "Unexpected argument '&'" error when trying to open URL #2490
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the background thingie not being passed properly to the command line due to how Sys works, which causes an error and prevents the link from being opened
Could be something with my system for all I know, not sure if being on Ubuntu WSL2 changes how the command behaves.If anyone else also compiles in Linux (no WSL) please confirm if this error happens to you too.
Edit: I tested this through native Ubuntu and also got the same error, so not related to WSL, unless it's related to Ubuntu in general.
Edit 2: This error is caused by how Haxe's Sys.command appends the arguments to the console, encasing them with single quotes. So the original code would cause the command to be
xdg-open 'https:/link.here' '&'
which makes xdg think that & is an argument, so not related to any Linux distro.