-
Notifications
You must be signed in to change notification settings - Fork 9.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
Console output shows control characters #3278
Comments
@JorritSalverda please can you add what version of terraform you are using |
$ terraform --version |
Just found the -no-color option. Can I somehow make this permanent so I don't have to set it each time? |
@JorritSalverda on OSX I use a makefile so I guess you could use a .bat / .ps file on windows and have it set in there |
No environment variables like with packer? See https://www.packer.io/docs/other/environmental-variables.html#PACKER_NO_COLOR |
Given that Windows has no support for VT100 escape codes, it seems like at least Terraform should just force colors off. It looks like the Windows console doesn't have any equivalent way to embed color codes in-band in the output stream and instead requires functions to be called between writes to the console, so actually supporting colors on Windows would probably require some more significant refactoring. Perhaps it's reasonable to have a special version of |
Fixed in #5718. |
This is not all fixed. We're still seeing this in v0.11.2 on vanilla powershell/command prompt but using ConEmu is a suitable workaround. |
Hi @IDT-kcrook! This was fixed by making the Windows build filter all output through a post-processor that parses VT100 escape sequences and translates them into equivalent calls to the Windows console API. This special handling only applies to the If you're running one of the native Windows builds and yet still seeing this problem in the built-in Windows shell, please open a new issue and fill out the new issue template so we can try to figure out what's happened here... the fix here went out in v0.6.14, and there were further improvements from #14194 released in v0.9.5, so it's likely that the issue you're seeing has a different root cause than this original report. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
In Windows, whether I use the command prompt, powershell or bash weird control characters show up in the output when running terraform:
←[0m
←[0m←[1mPlan:←[0m 0 to add, 1 to change, 0 to destroy.←[0m
The text was updated successfully, but these errors were encountered: