-
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
winpty does not work well with MSYS_NO_PATHCONV=1 #738
Comments
Yeah, |
So the resolution is not to use cmd //k 'dir c:\windows' |
Thanks,
works fine, but
will execute
|
That is not correct. It is MSYS2's runtime's POSIX->Windows path conversion that does this, and it does the expected thing because at some point the quotes are lost and MSYS2 has to interpret the argument as if it were a relative path. Take-home lesson: never use |
This statement is incorrect, as shown by the following experiment: args.c -> args.exe #include <stdio.h>
int main(int argc, char* argv[]) {
for (int i = 0; i < argc; i++) {
puts(argv[i]);
}
} Now observe:
As you can see, MSYS2 doesn't touch your arguments if it doesn't start with a slash. So yes, it's winpty doing the replacement.
You don't have choice when the program you're using is called node, php, php5, psql or python2.7, since in those cases winpty is forced on you. Which results in issues like #740. |
Yes, you have a choice. Just call them as If you have any splendid idea how to solve the interactive console problem in a better way, you know, I am all ears. |
Sure. Just have the users call |
Umm. Is this a joke? How is that a better idea? How does that prevent users flooding me (not you, of course) with bug reports? Sorry, I do not have time for this. |
No, that is correct. The MSYS2 runtime does not perform path conversion for its own programs. This is a very rudimentary conversion performed by winpty that seems to be causing problems all over the place. This should be fixed now, see this commit. |
I got directed here from the nodejs forum. This also fails under cygwin: PROMPT$ yes | xargs node.exe fillbuffer.js | tee xxx PROMPT$ cat fillbuffer.js |
@coderextreme Does it work if you call |
It ended up being that the node.js process wasn't exiting properly.
On Feb 24, 2017 10:24 AM, "Johannes Schindelin" <[email protected]> wrote:
@coderextreme <https://github.com/coderextreme> Does it work if you
call "C:\Program
Files\Git\usr\bin\bash.exe" -l -i from a cmd window and execute that
command-line there?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#738 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArE91b6qaeSgEMpJMkjLIiHgsgncfIPks5rfvYngaJpZM4ILaOZ>
.
|
@coderextreme It seems you either didn't read or didn't understand my comment. Please read it again. There is no evidence that it's a Node.js bug. Your problem also doesn't have anything to do with winpty (as it was pointed out to you), so I'm not sure why you brought it up in this issue. |
or closed issue
matching what I'm seeing
Setup
output of
git version
as well.Git for Windows 64bit on Windows 10
Windows 10, Pro, 64-bit
defaults?
default
to the issue you're seeing?
I've svn, docker
Details
bash
Minimal, Complete, and Verifiable example
this will help us understand the issue.
$ unset MSYS_NO_PATHCONV; MSYS_NO_PATHCONV=1 cmd /K dir 'c:\Windows'
$ unset MSYS_NO_PATHCONV; MSYS_NO_PATHCONV=1 winpty -- cmd /K dir 'c:\Windows'
$ unset MSYS_NO_PATHCONV; winpty -- cmd /K dir 'c:\Windows'
both 1st and 2nd command should run "dir" on C:\Windows
The 1st command, will run dir and stay in the cmd console, however, cursor will broken (up/down keys)
The 2nd command, will skip the "dir" but have cmd console, cursor work as expected.
The 3nd command, same as the 2nd.
It does matter not only doing for cmd.exe, but also many useful interactive shells for devs, e.g. mysql-sh, sqlcmd and sqlplus.
URL to that repository to help us with testing?
N/A
The text was updated successfully, but these errors were encountered: