Ignore unset and empty Kubernetes context
When current-context does not exist or is unset in $KUBECONFIG, kubectl is throwing a message to stderr "error: current-context is not set". Ignore it.pull/1380/head
parent
9b4a049571
commit
1e10ad1813
|
|
@ -337,7 +337,7 @@ function ruby_version_prompt {
|
||||||
}
|
}
|
||||||
|
|
||||||
function k8s_context_prompt {
|
function k8s_context_prompt {
|
||||||
echo -e "$(kubectl config current-context)"
|
echo -e "$(kubectl config current-context 2> /dev/null)"
|
||||||
}
|
}
|
||||||
|
|
||||||
function virtualenv_prompt {
|
function virtualenv_prompt {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue