mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-08-10 19:52:10 +00:00
ignore errors from tput (to fix TERM=vt100) (#73)
Currently TERM=vt100 is causing kubectx failure since tput is returning exitcode=1. vt100 does not have colors. Ignoring tput exit code. Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
e368d13eea
commit
7b23263fc2
6
kubectx
6
kubectx
@ -53,9 +53,9 @@ list_contexts() {
|
||||
cur="$(current_context)"
|
||||
|
||||
local yellow darkbg normal
|
||||
yellow=$(tput setaf 3)
|
||||
darkbg=$(tput setab 0)
|
||||
normal=$(tput sgr0)
|
||||
yellow=$(tput setaf 3 || true)
|
||||
darkbg=$(tput setab 0 || true)
|
||||
normal=$(tput sgr0 || true)
|
||||
|
||||
local cur_ctx_fg cur_ctx_bg
|
||||
cur_ctx_fg=${KUBECTX_CURRENT_FGCOLOR:-$yellow}
|
||||
|
6
kubens
6
kubens
@ -104,9 +104,9 @@ set_namespace() {
|
||||
|
||||
list_namespaces() {
|
||||
local yellow darkbg normal
|
||||
yellow=$(tput setaf 3)
|
||||
darkbg=$(tput setab 0)
|
||||
normal=$(tput sgr0)
|
||||
yellow=$(tput setaf 3 || true)
|
||||
darkbg=$(tput setab 0 || true)
|
||||
normal=$(tput sgr0 || true)
|
||||
|
||||
local cur_ctx_fg cur_ctx_bg
|
||||
cur_ctx_fg=${KUBECTX_CURRENT_FGCOLOR:-$yellow}
|
||||
|
Loading…
Reference in New Issue
Block a user