fix(kubectx): use the env variable for kubectl (#438)

This commit is contained in:
justin0u0 2025-01-23 01:07:57 +08:00 committed by GitHub
parent 0bcd0d5dd5
commit 013b6bc252
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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