win-shim
win-shim copied to clipboard
[BUG] Args are not passed through as is by default
I discover that args are not "passed through as is by default", as mentioned in the documentation.
By documentation I mean at least what we can read when executing shmake -h.
In fact you need to explicitly ask for it on the command line by specifying -a %s.
This is due to the fact that without being explicit, shmake.exe inject an empty string in the IDS_ARGS resource of shim.exe, and shim.exe pass args only if that resource contains %s somewhere.
I don’t know if we should fix the documentation, or shim.exe or shmake.exe or a bit of the two exe. And I’m not sure to have more time to invest here since I’ve got a workaround.
But at least it‘s now traced by that issue.
Thanks for pointing this out! :+1: Indeed, if the user haven't explicitly specified -a %s on the command line, the generated shim doesn't forward any arguments to the target executable.
I noticed your pull request #8 actually tries to fix two different bugs: one with argument passthrough, and another one with spaces in paths. Let's deal with them separately in order to keep things organized. I've created a new PR #9 that fixes the particular issue with argument passthrough - and only it. Proper handling of spaces in paths is discussed separately in #10 and resolved in #11.