-
-
Notifications
You must be signed in to change notification settings - Fork 466
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
[BUG] output should not be assumed to by a tty #950
Comments
Hi @myitcv , thanks for opening this issue! |
Wonderful. Is there any way that I can test it before then? My current means on installing
I work on the CUE project: Marcel and I are presenting on the topic: "A practical guide to CUE: patterns for everyday use" https://fosdem.org/2022/schedule/event/cue_pratical_guide/ We are using |
@myitcv ah, amazing and super interesting project 🙂 |
@myitcv rc.2 is released that you can use for testing. |
@iwilltry42 looks like you mistagged the release? https://github.com/rancher/k3d/tree/v3.5.0-rc.2 i.e. |
Whoops.. yep 😬 |
No worries! I've just tested the release in any case and spotted an issue. I think this comparison should be inverted: Also, if that issue is fixed, I'm seeing quite verbose, unfriendly logging when
My own preference would be to drop the timestamps and the level from the output to instead give:
Thoughts? |
I raised #958 in case it's helpful. Please feel free to disregard if you have your own fix. |
Yep, thanks for the fix @myitcv ! |
Thanks @iwilltry42: |
Thanks very much for creating
k3d
. We are using it in an upcoming live demo, for FOSDEM 2022, that we are sharing for others to be able to run locally... and unfortunately this bug is a show-stopper so would appreciate any thoughts/workarounds in the short term.What did you do
n/a. Just looked at the output of the above commands.
What did you expect to happen
For the output not to use control characters by default. The issue appears to be rooted in the hardcoding of coloured output:
https://github.com/rancher/k3d/blob/793fbce86c225033188bd992b753fa79eb6e2fb2/cmd/root.go#L188
I realise however that with
docker
and other commands that ship has somewhat sailed to have coloured output by default.Therefore, perhaps a more realistic expectation would be to be able to turn off coloured output via an environment variable and/or flag. Much like
docker buildx build --progress plain
. Ideally both a flag and environment variable would be supported. In our situation we would prefer to set an environment variable because we runk3d
within a scripted setup where the output, whilst atty
, should not be coloured and hence it should not include any control characters.Screenshots or terminal output
Output from above is:
Which OS & Architecture
Which version of
k3d
Which version of docker
The text was updated successfully, but these errors were encountered: