Skip to content
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

🌈 Add colorization to the output #1949

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

mr0re1
Copy link
Collaborator

@mr0re1 mr0re1 commented Nov 8, 2023

Add color to the small set of outputs of create command.

Screenshot 2023-11-07 at 4 50 38 PM Screenshot 2023-11-07 at 4 49 49 PM

Feature is hidden behind flag --no-color=false (default is true), also it is ignored if output doesn't support colors, see:

$ ./ghpc create tst.yaml -w --no-color=false 2> /tmp/out
$ cat /tmp/out
Error: invalid module id: "var" - Did you mean "vars"?
45:       node_count_dynamic_max: $(var.wut)

NOTE: All added dependencies are under MIT license.

@mr0re1 mr0re1 requested a review from cboneti November 8, 2023 01:03
@mr0re1 mr0re1 changed the title Add colorization to the output 🌈 Add colorization to the output Nov 8, 2023
@mr0re1 mr0re1 added the release-improvements Added to release notes under the "Improvements" heading. label Nov 8, 2023
Copy link
Member

@cboneti cboneti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nit, which is the choice of disabling it by default. Do you foresee the chance of having it break?

cmd/color.go Show resolved Hide resolved
Copy link
Member

@cboneti cboneti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will approve in case you have a good reason for not making this default. But consider changing it if you feel it is reliable....

@cboneti cboneti assigned mr0re1 and unassigned cboneti Nov 8, 2023
@mr0re1 mr0re1 merged commit a20e20c into GoogleCloudPlatform:develop Nov 8, 2023
@mr0re1 mr0re1 deleted the color branch November 8, 2023 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-improvements Added to release notes under the "Improvements" heading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants