You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
node -p process.verions display issue on Windows Cmd #27819
I had a look at the changelog and I can't find anything obvious. Could someone verify that c2a03d58c3 has no impact? It seems the only entry that might have caused this? Otherwise it's probably best to bisected the commit.
Thanks. It seems we have to use uv_write for TTY on Windows so that libuv converts the color codes for us. I won't be near a Windows machine anytime soon, so I guess we could leave the patch reverted for now (or unless someone is willing to pick it up).
Thanks. It seems we have to use uv_write for TTY on Windows so that libuv converts the color codes for us. I won't be near a Windows machine anytime soon, so I guess we could leave the patch reverted for now (or unless someone is willing to pick it up).
I've submitted an alternative to the full revert that falls back to console.log() for TTY on Windows: #27829
Activity
vsemozhetbyt commentedon May 22, 2019
Can reproduce for v12.3.0 on Windows 7 x64 with cmd.exe. Output in the REPL is OK.
richardlau commentedon May 22, 2019
12.2.0 also fails but 12.1.0 is okay.
BridgeAR commentedon May 22, 2019
I had a look at the changelog and I can't find anything obvious. Could someone verify that c2a03d58c3 has no impact? It seems the only entry that might have caused this? Otherwise it's probably best to bisected the commit.
richardlau commentedon May 22, 2019
Latest nightly from master also fails:
richardlau commentedon May 22, 2019
Reverting 2b24ffa on master restores the expected behaviour. I'll open a revert PR.
Revert "lib: print to stdout/stderr directly instead of using console"
richardlau commentedon May 22, 2019
PR: #27823
Fishrock123 commentedon May 22, 2019
Can someone check if
process._rawDebug(message)has the same effect in Windows CMD?joyeecheung commentedon May 22, 2019
Do you actually see colors in the original version of
node -p?targos commentedon May 22, 2019
yes:

joyeecheung commentedon May 22, 2019
@targos
Thanks. It seems we have to use
uv_writefor TTY on Windows so that libuv converts the color codes for us. I won't be near a Windows machine anytime soon, so I guess we could leave the patch reverted for now (or unless someone is willing to pick it up).bzoz commentedon May 22, 2019
That is exactly what is happening, ANSI codes are emulated on Windows with WinApi calls.
lib: use console.log for TTY on Windows
richardlau commentedon May 22, 2019
I've submitted an alternative to the full revert that falls back to
console.log()for TTY on Windows: #27829Revert "lib: print to stdout/stderr directly instead of using console"
Revert "lib: print to stdout/stderr directly instead of using console"