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

Do not print colors if stdout isn't tty #41

Merged
merged 1 commit into from
Apr 17, 2018
Merged

Do not print colors if stdout isn't tty #41

merged 1 commit into from
Apr 17, 2018

Conversation

ahmetb
Copy link
Owner

@ahmetb ahmetb commented Apr 11, 2018

This is previously offered in #18, #22, and #27 and I previously rejected
these PRs. My rationale was to prevent scripting around kubectx as it is
meant to be used as an interactive tool.

But clearly that will be a problem, when you're doing operations like:

kubectx -d $(kubectx)

which I proposed in #39. Plus this change is harmless. I think this
implementation does a better check than the previous ones.

This is previously offered in #18, #22, and #27 and I previously rejected
these PRs. My rationale was to prevent scripting around kubectx as it is
meant to be used as an interactive tool.

But clearly that will be a problem, when you're doing operations like:

    kubectx -d $(kubectx)

which I proposed in #39. Plus this change is harmless. I think this
implementation does a better check than the previous ones.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
@ahmetb ahmetb merged commit d1b69a9 into master Apr 17, 2018
@ahmetb ahmetb deleted the tty_check branch April 17, 2018 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant