mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-06-19 20:23:23 +00:00
Ensure kubectl in PATH for kubens
This commit is contained in:
parent
6c94248e98
commit
083e56f221
4
kubens
4
kubens
@ -156,6 +156,10 @@ swap_namespace() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
if ! hash kubectl 2>/dev/null; then
|
||||||
|
echo >&2 "kubectl is not installed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if [[ "$#" -eq 0 ]]; then
|
if [[ "$#" -eq 0 ]]; then
|
||||||
if [[ -t 1 && -z ${KUBECTX_IGNORE_FZF:-} && "$(type fzf &>/dev/null; echo $?)" -eq 0 ]]; then
|
if [[ -t 1 && -z ${KUBECTX_IGNORE_FZF:-} && "$(type fzf &>/dev/null; echo $?)" -eq 0 ]]; then
|
||||||
choose_namespace_interactive
|
choose_namespace_interactive
|
||||||
|
Loading…
Reference in New Issue
Block a user