From fe37aaac1929390e5dc0536ba6a8e62efed509f1 Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Sat, 22 Apr 2023 11:08:04 +0200 Subject: [PATCH] Allow for no kubeconfig --- zsh/aliases.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 2106bfc..c188690 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -120,8 +120,8 @@ if [ $? -eq 0 ]; then kube() { local kube_config=$HOME/.kubes/$1/config if [ $# -ne 1 ]; then - echo >&2 error: kube expects a single argument - return 1 + rm ~/.kubes/current-cube + export KUBECONFIG="" elif [ ! -f $kube_config ]; then echo >&2 error: no such kube config: $kube_config return 1