fix(kubectx): use the env variable for kubectl

Signed-off-by: Justin Chen <mail@justin0u0.com>
This commit is contained in:
Justin Chen 2025-01-22 16:56:31 +08:00
parent 0bcd0d5dd5
commit 5ab897dd87

View File

@ -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