-
Notifications
You must be signed in to change notification settings - Fork 168
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
winpty automatic slash-to-backslash conversion messes commands that need slashes #88
Comments
FWIW, upstream winpty passes arguments through unmodified, which I think matches Cygwin's behavior. If you can get upstream winpty working with your Git Bash environment, then I think you'd avoid this problem. You could try downloading winpty-0.4.0 from https://github.com/rprichard/winpty/releases/tag/0.4.0. I think you'd need the 32-bit or 64-bit MSYS2 packages according to MSYS2 (and MSYS, IIRC) uses a heuristic to automatically detect Unix-style paths in arguments and convert them to Windows-style paths. IIRC, that conversion behavior isn't exposed from the MSYS2 DLL. When winpty was packaged for MSYS2, the packager added the argument slash-to-backslash conversion. Eventually, the argument conversion code from MSYS2 was brought into the MSYS2-packaged version of winpty: msys2/MSYS2-packages@f6440fb. That may be something this project should also do. I'm guessing you don't have that version yet, because the MSYS2 conversion heuristic seems to leave Slightly related to #81, but not really. |
Thanks for the thorough explanation! |
@mrts Did this solve your problem, i'm having the same issue with git bash. |
MSYS2's automatic path conversion can be controlled by an environment variable |
MSYS2 has a It looks the process spawn's argument heuristic has a bunch of additional special cases in Git-for-Windows that aren't in MSYS2. e.g.:
The MSYS2-patched winpty uses the argument heuristic on the first argument, which is a mistake. MSYS2 uses I'm wondering again whether winpty should try to access the MSYS argv -> cmdline translation code. If nothing else, it could use POSIX spawn to start |
Environment
Problem
Running docker inside mintty fails and there's a correct recommendation to use winpty:
However, when using winpty, slashes are converted to backslashes that messes up docker that expects slashes:
Expected behavior
Slashes are not converted to backslashes or there is a way to turn this off.
The text was updated successfully, but these errors were encountered: