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 -no-color option for subcommands #2414

Merged
merged 2 commits into from
Jun 23, 2015

Conversation

radeksimko
Copy link
Member

This piece of code is apparently responsible for deciding whether to colorize the output:
https://github.com/hashicorp/terraform/blob/master/command/meta.go#L349-357

but that function is effectively removing the -no-color from arguments list, but only setting the internal color property, therefore when the Meta struct (already having color=false and no argument to be processed) is passed down to the subcommand, it will take the default Color which is true and turn color always back on.

Closes #2333

Was there any specific intention with color/Color?

@phinze
Copy link
Contributor

phinze commented Jun 22, 2015

Nice detective work! 🔍

Was there any specific intention with color/Color?

I doubt it. Poking around the git trees - this seems to be an accident of history more than anything.

Seems a bit janky to keep color and Color hanging around, but if it fixes the issue, this LGTM!

phinze added a commit that referenced this pull request Jun 23, 2015
@phinze phinze merged commit 3f2119c into hashicorp:master Jun 23, 2015
@radeksimko radeksimko deleted the no-color-for-subcommands branch June 23, 2015 21:51
@ghost
Copy link

ghost commented May 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

terraform remote subcommands don't support -no-color option
2 participants