From 4b203c2a221961616c0fa79a43525d875ffc5f61 Mon Sep 17 00:00:00 2001 From: madumlao Date: Wed, 21 Apr 2021 16:05:37 +0800 Subject: [PATCH] Only source kubectl if it exists --- skel/.bash_profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skel/.bash_profile b/skel/.bash_profile index deca165..b5883b1 100644 --- a/skel/.bash_profile +++ b/skel/.bash_profile @@ -9,6 +9,6 @@ fi source "$HOME/.profile" # source kubernetes shell completion -if [ "$PROFILE_ENABLE_KUBECTL" ]; then +if type kubectl 2> /dev/null && [ "$PROFILE_ENABLE_KUBECTL" ]; then source <(kubectl completion bash) fi