Ensure kubectl in PATH for kubens

This commit is contained in:
Robert James Hernandez 2018-10-19 22:20:16 -07:00
parent 6c94248e98
commit 083e56f221

4
kubens
View File

@ -156,6 +156,10 @@ swap_namespace() {
}
main() {
if ! hash kubectl 2>/dev/null; then
echo >&2 "kubectl is not installed"
exit 1
fi
if [[ "$#" -eq 0 ]]; then
if [[ -t 1 && -z ${KUBECTX_IGNORE_FZF:-} && "$(type fzf &>/dev/null; echo $?)" -eq 0 ]]; then
choose_namespace_interactive