sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.04k stars 70 forks source link

GameScope: Append '--' to end of GAMESCOPEARGSARR if it is missing #1050

Closed sonic2kk closed 4 months ago

sonic2kk commented 4 months ago

Fixes #1048. Follow-up to #1049.

Very similar to #1049, except this handles the case where the given GameScope arguments string that we want to break up into GAMESCOPEARGSARR (which ultimately gets passed to the launch command) does not end with --. This causes the same problem as if the arguments are blank: the GameScope command is not properly terminated.

ShellCheck is good on this at time of writing but I want to do some more testing (such as with whitespaces and such after the args string to see how we handle that).

sonic2kk commented 4 months ago

Tested and this works with the following GameScope arg strings:

I tested the arguments with a ton of whitespaces and they do break, but I think it's up to the user to make sure they format the args correctly. Appending -- is just a convenience, trying to handle formatting the spacing between flags would add a lot of complexity especially when it comes to paths. So for now, we will leave this.


Now that testing is done, this is ready to merge after a version bump.