mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-06-27 15:56:49 +00:00
Adding dependency checker for kubectx and kubens (#92)
Ensure kubectl in PATH for kubectx and kubens.
This commit is contained in:
commit
517dae9fc8
4
kubectx
4
kubectx
@ -159,6 +159,10 @@ delete_context() {
|
||||
}
|
||||
|
||||
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_context_interactive
|
||||
|
Loading…
Reference in New Issue
Block a user