-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Bash translates path parameter in Unix format to windows format, need a way to suppress it #577
Comments
Add a / to suppress translation: docker run -ti --rm -v "//c/Users/igor/Documents/Mikogo4://app Note that you'll need to double the container path also.
|
Nope. MSYSGIT is almost certainly not what you think it is. What you refer to is Git for Windows.
From the release notes' known issues:
|
If you require the argument to have a starting "/" then the workaround fails, MSYS2 has an option for this, but it's another tool :( |
@dsco Apologies for dredging up such an ancient issue but this isn't working for me. I have just installed the latest Git for Windows from https://git-scm.com/download/win, I open a fresh window, $ node -e "console.log(process.argv)" -- /a/b/c
[ 'C:\\Program Files\\nodejs\\node.exe', 'A:/b/c' ]
$ MSYS_NO_PATHCONV=1 node -e 'console.log(process.argv)' -- /a/b/c
[ 'C:\\Program Files\\nodejs\\node.exe', 'A:/b/c' ] What am I missing? I can't put a leading slash on the front, and this is not a path. I need to pass the six-character string "/a/b/c" as an argument to my script, unaltered. I saw elsewhere to try $ set -f MSYS2_ARG_CONV_EXC="*"
$ echo $MSYS2_ARG_CONV_EXC
*
$ node -e "console.log(process.argv)" -- /a/b/c
[ 'C:\\Program Files\\nodejs\\node.exe', 'A:/b/c' ] |
Almost, but not quite.
It seems that |
You don't set environment variables that way in Bash, skip the |
$ alias
alias ll='ls -l'
alias ls='ls -F --color=auto --show-control-chars'
alias node='winpty node.exe'
$ winpty -- echo /a/b/c
A:/b/c
$ MSYS_NO_PATHCONV=1 node.exe -e "console.log(process.argv)" -- /a/b/c
[ 'C:\\Program Files\\nodejs\\node.exe', '/a/b/c' ] Astounding. It was the alias I was missing. Thank you. |
Try |
MSYSGIT version: 2.6.4
If I run the following command in git-bash terminal on my windows pc:
bash thinks I used paths in Unix format, so it translates them to windows format which is unwanted in this case, and I get the error:
Is there is a way to suppress the automatic path translation?
The text was updated successfully, but these errors were encountered: