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

Fixed usage of NOMAD_CLI_NO_COLOR env variable. #11168

Merged
merged 2 commits into from
Sep 18, 2021

Conversation

apollo13
Copy link
Contributor

Fixes #10982

@lgfa29
Copy link
Contributor

lgfa29 commented Sep 17, 2021

Thank you for looking into this and fixing it! It's weird that this env var was only being ignored in some commands 😅

I pushed a commit to add a CHANLOG entry and some tests. I also changed the logic a bit to read the command UI type and decide if colors should be disabled based on that. This will avoid having to check the env var in multiple places, since it's already being checked in main.go.

This change will also help with #10975, since I think you won't need to check for the new env var in Colorize. If that's indeed the case, could you update that PR?

Thanks again for the contribution!

@lgfa29 lgfa29 merged commit f6c1e1d into hashicorp:main Sep 18, 2021
@apollo13
Copy link
Contributor Author

This change will also help with #10975, since I think you won't need to check for the new env var in Colorize. If that's indeed the case, could you update that PR?

Will do that over the following days. Your approach is certainly nicer -- my (none existent) go knowledge prevented me from knowing about that type cast/check thingy. Thanks for the edits.

@apollo13 apollo13 deleted the no-color branch September 18, 2021 19:04
@lgfa29
Copy link
Contributor

lgfa29 commented Sep 20, 2021

Will do that over the following days. Your approach is certainly nicer -- my (none existent) go knowledge prevented me from knowing about that type cast/check thingy. Thanks for the edits.

We don't expect any Go knowledge and really appreciate your effort in fixing these issues 🙂

@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NOMAD_CLI_NO_COLOR env flag not working
3 participants