Skip to content

Commit

Permalink
only match on whole words to prevent command overlap
Browse files Browse the repository at this point in the history
Only match on 'otr' and not 'thisisotrblahblah'.
If commands contain the match pattern as a substring,
this will prevent matching.

For example if we had a 'one' command, this will prevent
'one' and 'onetimerun' from being matched together.
  • Loading branch information
sonic2kk committed Jun 16, 2024
1 parent 41283f0 commit 58f78a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions steamtinkerlaunch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
PREFIX="/usr"
PROGNAME="SteamTinkerLaunch"
NICEPROGNAME="Steam Tinker Launch"
PROGVERS="v14.0.20240617-1 (fix-gamelaunch-steamappscommon)"
PROGVERS="v14.0.20240617-2 (fix-gamelaunch-steamappscommon)"
PROGCMD="${0##*/}"
PROGINTERNALPROTNAME="Proton-stl"
SHOSTL="stl"
Expand Down Expand Up @@ -26772,7 +26772,7 @@ function main {
commandline "$@"
# HACK: Since we check for steamapps/common ($SAC), commands which contain this (such as a one-time run path) will incorrectly get triggered as a game launch
# As a workaround, skip a hardcoded set of commands and pass directly to commandline (i.e. if we have OTR as our first option, pass down to commandline function and run otr)
elif grep -qE "otr|onetimerun" <<< "${1}"; then
elif grep -qwE "otr|onetimerun" <<< "${1}"; then
commandline "$@"
else
setGameVars "$@"
Expand Down

0 comments on commit 58f78a8

Please sign in to comment.