Respect the KREW_ROOT variable

This commit is contained in:
dabruh 2024-02-12 08:23:28 +01:00
parent e34b12a5eb
commit cd60ff5c22
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,8 @@ script_dir="$(
opt_dir=/opt/dotfiles opt_dir=/opt/dotfiles
python_venv=$opt_dir/pyenv python_venv=$opt_dir/pyenv
[ -z "$KREW_ROOT" ] && export KREW_ROOT="${XDG_DATA_HOME:-$HOME/.local/share}/krew"
# #
# Argument parsing and help # Argument parsing and help
# #
@ -205,7 +207,7 @@ function setup_krew() {
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz" curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/${KREW}.tar.gz"
tar zxvf "${KREW}.tar.gz" tar zxvf "${KREW}.tar.gz"
./"${KREW}" install krew ./"${KREW}" install krew
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" export PATH="$KREW_ROOT/bin:$PATH"
set +e set +e
} }