-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Color Escape Codes displayed incorrectly #9312
Comments
Which version of This looks like this isn't |
I'm using npm v7.5.3 installed in C:\Program Files\nodejs\npm. The examples above are Windows Terminal/PowerShell, mintty/GNU bash, version 4.4.23(1)-release (x86_64-pc-msys), and Cmder/Cygwin GNU bash, version 4.4.12(3)-release (x86_64-unknown-cygwin) respectively. The Windows Terminal acts the same with my Cygwin Bash though. |
Suffer from this issue too on Cygwin + Windows Terminal |
(I'm assigning Dustin because he's got an idea for an FAQ for the docs for this kind of issue) |
Also related: #4921 |
Another example of cases where this is broken (and deserves a proper FAQ writeup): #13572 |
Does that mean there is a solution? I see above that Dustin was supposed to write one, but I can't find it. Also, why does it not affect cmd? mikofski said so and I can confirm. |
Huh. I should write this stuff down! So, the reason it would apply in one shell and not the other is that they take different approaches to enabling/disabling the VT_PROCESSING mode for client applications. I believe PowerShell explicitly turns VT off when it spawns a client and turns it back on before displaying the prompt, whereas CMD restores the original console mode when it spawns a client and turns it back on before displaying the prompt. In this case, the difference between "turning VT off" and "restoring the original mode" becomes critically important: in Terminal, the original mode that CMD restores already has VT turned on, so when msys2 comes to save/restore the mode on its own, VT is already on. |
Having the same issue when running Git bash in Terminal, executing Azure CLI commands. Windows.Terminal: Version: 1.15.2874.0
|
The problem:
###Microsoft Terminal with errors:
![image](https://user-images.githubusercontent.com/210185/109440111-ac073000-79f6-11eb-8bc0-8916fcd570ce.png)
Git Bash Terminal
Cmder Terminal
Same behavior with Microsoft Terminal and bash shell used by Cmder.
Environment
Steps to reproduce
npm run [some script]
Where the script produces terraform errors.
Expected behavior
Normal display
Actual behavior
Non-interpreted escape codes
The text was updated successfully, but these errors were encountered: