From 013b6bc252ea6bbe7c8372ed64c327ad8a52f003 Mon Sep 17 00:00:00 2001 From: justin0u0 <38185674+justin0u0@users.noreply.github.com> Date: Thu, 23 Jan 2025 01:07:57 +0800 Subject: [PATCH] fix(kubectx): use the env variable for kubectl (#438) --- kubectx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kubectx b/kubectx index 12ea40c..4f02e5b 100755 --- a/kubectx +++ b/kubectx @@ -227,7 +227,7 @@ main() { # we don't call current_context here for two reasons: # - it does not fail when current-context property is not set # - it does not return a trailing newline - kubectl config current-context + $KUBECTL config current-context elif [[ "${1}" == '-u' || "${1}" == '--unset' ]]; then unset_context elif [[ "${1}" == '-h' || "${1}" == '--help' ]]; then