Fix unreasonably small DefaultShellCommandOption size limit#683
Conversation
|
commenting to try to kick-off CI...have had some changes to the trigger recently |
|
CI looks good - thanks @samhocevar! |
|
Actually - I'm having trouble repro'ing the scenario in the description with these changes so there may be additional changes needed to get this to work. The non-interactive session still fails to return the output of the command to the console. |
|
Sorry, |
|
Maybe the following information can help pinpoint the problem? Without modifying OpenSSH, my setup uses the following configuration: My @call %~dp0\msys2_shell.cmd -defterm -mingw64 -no-start %*And non-interactive login works like this: |
|
Thanks @samhocevar - are you running With just the DefaultShell configured, I'm able to execute a non-interactive command. |
|
Thanks for the additional clarifications @samhocevar - am now able to repro the fix locally. One more question...
Is |



The
DefaultShellCommandOptionregistry key has a size limit of 15 characters. This seems unreasonably small especially sinceDefaultShellArgumentshas a much larger limit and its contents are not used for a non-interactive shell, so a lot of what is in there has to be duplicated.For instance, if I wanted to configure OpenSSH to use MSYS2 without creating a helper script, this is what my registry keys would look like:
This PR increases the limit to the same value as
DefaultShellArguments, which is currentlyPATH_MAX / 2 - 1.