Allow for no kubeconfig
This commit is contained in:
parent
969f042778
commit
fe37aaac19
|
@ -120,8 +120,8 @@ if [ $? -eq 0 ]; then
|
||||||
kube() {
|
kube() {
|
||||||
local kube_config=$HOME/.kubes/$1/config
|
local kube_config=$HOME/.kubes/$1/config
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
echo >&2 error: kube expects a single argument
|
rm ~/.kubes/current-cube
|
||||||
return 1
|
export KUBECONFIG=""
|
||||||
elif [ ! -f $kube_config ]; then
|
elif [ ! -f $kube_config ]; then
|
||||||
echo >&2 error: no such kube config: $kube_config
|
echo >&2 error: no such kube config: $kube_config
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in New Issue