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

Fix winecmd when Wine path contains spaces #2108

Merged
merged 1 commit into from
Sep 3, 2023

Conversation

Matoking
Copy link
Contributor

Follow-up to #2037. While that PR fixed -e parameter for some terminals such as xterm, the single string passed as argument was not escaped properly, causing winecmd to fail if WINE contained a space.

Fix this by single quoting each argument and concatenating them together. This is a bit tricky in POSIX sh without printf %q, but seems to work fine with the code suggested by ShellCheck for SC3050.

I went ahead and tested the fix with every terminal except for Terminal, and it should work properly in all cases now.

Fix `winecmd` verb when path to Wine contains a space.

The arguments for `winetricks_shell` were passed as-is in a
space-separated string, meaning a single argument with a space in it
(eg. the Wine path) would break the entire command.

Fix this by single quoting each argument and concatenating them
together. This is a bit tricky in POSIX sh without `printf %q`,
but seems to work fine with the code suggested by ShellCheck for SC3050.
@austin987 austin987 merged commit 9ad2f41 into Winetricks:master Sep 3, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants