Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package-all.sh: Don't use parameter expansion for paths #20385

Merged
merged 1 commit into from
Dec 31, 2022

Conversation

Unrud
Copy link
Contributor

@Unrud Unrud commented Oct 21, 2022

cd "${0%/*}" fails when the script is started with bash package-all.sh because $0 is package-all.sh in this case.

It fails when the script is started with `bash package-all.sh`.
@anvilvapre
Copy link
Contributor

Seems OK, only that in launch-game.sh a more robust solution is already used:

LAUNCHPATH=$(python3 -c 'import os,sys; print(os.path.realpath(sys.argv[1]))' "$0")

(realpath is not available on MacOS)

@Unrud
Copy link
Contributor Author

Unrud commented Oct 30, 2022

only that in launch-game.sh a more robust solution is already used:

The path is only used for cd. I see no reason for the use of realpath here.

@Mailaender Mailaender merged commit b1ffe0e into OpenRA:bleed Dec 31, 2022
@Mailaender
Copy link
Member

Changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants