Add terminal color choosing support#2508
Conversation
|
|
||
|
|
||
| func getTermColor() aec.ANSI { | ||
| envColorString := os.Getenv("BUILDKIT_TERM_COLOR") |
There was a problem hiding this comment.
Is there a convention for this? I know NO_COLOR is a thing but this looks somewhat weird as there isn't just one color. You are changing the color of the completed item but iirc we have 4 possible different colors used by this progressbar.
There was a problem hiding this comment.
AFAIC there is not convention on terminal color naming. I just took the ones from "github.com/morikuni/aec" in lower case.
This PR only affects the "typical buildkit blue" color and not the other 3. It's not a complete theme (I actually like the idea of having it 😺).
810b74b to
5f698ba
Compare
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
5f698ba to
4ac2fc5
Compare
|
@crazy-max wdyt? I think we could definitely support Currently just having a special env for overriding one specific color seems too hacky to me. |
|
Yes agree that we should support I'm not aware of a convention but we should also support cancel and error states (probably also warning #2498 in the future). Maybe with a key like you said @tonistiigi |
|
As discussed using
|
|
So not Keys do not need to be 2 chars and there is no "orange". |
|
@ulyssessouza Is this PR being actively worked on still, based on the feedback? I would love to see this functionality implemented in buildkit. |
|
@spkane I'll finish that soon... Just trying to make a bit of time here... Wouldn't take much time |
|
@ulyssessouza I took a stab at this in another PR (#2954), because I had some time and the desire to try and implement this. I'd appreciate hearing what you think. |
|
fixed by #2954 |
This adds the capability of choosing the color to print in the terminal by just setting an envvar called
BUILDKIT_TERM_COLOR.Note that this is a "follow-up" of #2368 making it more flexible so that the users can choose it's preferred color depending on their terminal themes and preferences.
It supports the following values: