mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-09-18 00:37:45 +00:00
Do not print colors if stdout isn't tty
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>
This commit is contained in:
Reference in New Issue
Block a user