-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
clusterctl describe not working in Windows PowerShell #7381
Comments
/triage accepted Q: should we report the issue to fatih/color maintainers? (or might be this already has been fixed in latest version of this library) |
I'm not sure if the library is wrong, but rather our usage of it. |
that could be another issue as well, but I think we should nail down the problem before deciding to workaround it |
We're using the latest version (v1.13.0) but it's 1+ years old. This issue might have been solved in a more recent commit. I think changing the behaviour of the color flag is good as a change in any case, but it would be very nice if we could get color output working on PowerShell. |
I think it's definitely bad that we still produce colored output if someone sets
Sorry, that was easily misunderstood. I was only referring to the way colored output can be enabled/disabled with our flag + how the lib reacts to NO_COLOR. But of course let's also take a look at how the colored output is not rendered correctly in PowerShell and if a new library version fixes that or we should open an issue in their repo. |
I'll report the issue, bit after going over a bunch of workarounds it seems that there's a general issue with getting colors to work in PowerShell / cmd environments. Changing the terminal settings as described here - https://stackoverflow.com/questions/51680709/colored-text-output-in-powershell-console-using-ansi-vt100-codes - worked to fix the output but did not actually get colors in the output 😕. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/close I believe this was fixed in https://github.com/fatih/color/releases/tag/v1.15.0. Closing due to lack of interest. |
@killianmuldoon: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Running
cluster describe cluster my-cluster
on PowerShell results in broken output as the colors are not rendered correctly. There is a current workaround involving setting aNO_COLOR
environmental variable to print the output without color.clusterctl describe
(on main) supports a --color flag which forces color output when it's off by default (the library clusterctl uses fatih/color does this when the output is not to a terminal. Currently this flag defaults to false and is a no-op when set to false.One solution to the PowerShell problem would be to change the usage of that flag so that when it's set to false it always turns the color off. That would allow users to explicitly opt out of using colors in the output.
/area clusterctl
/kind bug
The text was updated successfully, but these errors were encountered: