Only source kubectl if it exists

This commit is contained in:
2021-04-21 16:05:37 +08:00
parent 0092e51c81
commit 4b203c2a22

View File

@@ -9,6 +9,6 @@ fi
source "$HOME/.profile" source "$HOME/.profile"
# source kubernetes shell completion # source kubernetes shell completion
if [ "$PROFILE_ENABLE_KUBECTL" ]; then if type kubectl 2> /dev/null && [ "$PROFILE_ENABLE_KUBECTL" ]; then
source <(kubectl completion bash) source <(kubectl completion bash)
fi fi