-
Notifications
You must be signed in to change notification settings - Fork 29.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
process.stdin
never returns with using Git Bash for Windows
#5620
Comments
/cc @nodejs/platform-windows |
smells like it might be related to #5384 |
#5384 (comment) seems to be fixed on v6.2.0. |
Simpler testcase: This happens because the call to Might be a Windows bug? Pinging @orangemocha @piscisaureus @saghul |
@seishun I'm not sure what happens in that case TBH. Git Bash is a MSYS based environment AFAIK, so I wonder if it will load that super-old CRT MSYS was based on. |
@saghul Do you mean C runtime library? That's irrelevant since NtQueryInformationFile is a Win32 function, right? Also Git Bash is based on MSYS2 nowadays, which is a recent fork of Cygwin. |
Yes, it's a Win32 API function, but stdin / out / err are CRT fds, so I guess the problem comes somewhere around there. |
This is related to #3006 . In Git Bash, with winpty node.exe test.js
winpty node test.js |
In case anyone is wondering, this is because Git Bash aliases |
Hah, and instead we get to deal with the fallout? Nice! Am I right in concluding that this is an environmental issue not directly caused by or under control of node? If yes, I move to close. |
Sorry for that.
Yes, the problem is caused by MinTTY using the tty emulation of MSYS2's runtime (which is a portable version of the Cygwin runtime), and node expecting to talk to a real Win32 Console (which the
FWIW I agree. |
Thanks for chiming in. Okay, I'll go ahead and close. |
Hey guys, I'm not as technical as you, but I followed all the links here and in other issues and have read it all (didn't understand much, since my programming skill-set is only client-side), and I didn't fully get what is the status of the git bash colors issue? should I download any new version of anything? because I'm already on latest GIT (windows port) so should I try Node7? I'm not sure what to do to see colors on my Git Bash :( |
@yairEO I don't think this issue was related to colours on Git bash. What exactly is the issue you're seeing? This issue is a problem with Git Bash not with node, the workaround is to run |
@gibfahn - thank you, I followed the maze of issues pointing to one another until I ended up here, at the bottom of the trail, so I thought it wouldn't hurt asking, but luckily I was helped in another thread |
@yairEO in the future you're very welcome to ask questions at https://github.com/nodejs/help |
I think that this should help: Run it in git-bash once and you can use 'npm test' |
Actually you should run this instead and restart git-bash: |
@ltvan does this really fix the problem with the script described in this ticket? If so, would it not make more sense to add |
It does work in my environment. Adding to git-extra is good so. However, if you run through gulp or grunt, the |
In opposition to workaround given by @gibfahn above I had to use node.exe instead of node to get some script processing content redirected on stdin, so my workaround is the opposite to his suggestion. didn't work:
did work:
|
From mysticatea/npm-run-all#24
process.stdin
getter stops a program in the following case:child_process.exec
)This is a repro steps:
The results of above:
cmd.exe OK
PowerShell OK
Git Shell of GitHub for Windows OK
Git Bash of Git for Windows Wrong
The program stops at
process.stdin
, then"after stdin: child"
has never printed.If I types Enter Key, the program resumes.
The text was updated successfully, but these errors were encountered: