I'm using msys2 bash 4.3.26 (i686-pc-msys)
on Windows, and recently I find that it breaks my pscp
and scp (msys1)
:
When I run pscp req.py hostname:/home/user/xxx/yyy/
:
msys
will change the second args to hostname;D:\msys\home\user\xxx\yyy\
pscp
will report: ssh_init: Host does not exist
scp
which is from msys-1.0 (I once used git-for-windows 1.9) reports ssh: Could not resolve hostname
hostname;d
: no address associated with name
This is annoying and I have to open cmd.exe
to use pscp
. Is there any way to prevent MSYS 2 from convert special args?
'
or "
and failedscp.exe
in the same package of msys2
works wellBTW, this problem only occurs on those .exe files which does not use msys2 DLLs. How this difference is being checked?
MSYS2 converts POSIX-style path names to Windows-style path names when it detects you are running a native Windows program like pscp. These conversions use a lot of heuristics and sometimes they get the wrong answer.
You can inhibit conversions of certain arguments by setting the MSYS2_ARG_CONV_EXCL
environment variable as you run the command. It is a list of prefixes of arguments for which MSYS2 should not attempt to convert paths. You could just set the variable to the empty string in order to turn off all conversions. However, you might need the first argument to pscp to be converted since it is a path on your local computer. So you should try running your command like this instead:
MSYS2_ARG_CONV_EXCL=hostname pscp req.py hostname:/home/user/xxx/yyy/