From cd60ff5c22d7178d1c78f6089c4f871a468a05c2 Mon Sep 17 00:00:00 2001 From: dabruh <11458706-dabruh@users.noreply.gitlab.com> Date: Mon, 12 Feb 2024 08:23:28 +0100 Subject: [PATCH] Respect the KREW_ROOT variable --- setup_system.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setup_system.sh b/setup_system.sh index 19a64e4..e17b41e 100755 --- a/setup_system.sh +++ b/setup_system.sh @@ -14,6 +14,8 @@ script_dir="$( opt_dir=/opt/dotfiles python_venv=$opt_dir/pyenv +[ -z "$KREW_ROOT" ] && export KREW_ROOT="${XDG_DATA_HOME:-$HOME/.local/share}/krew" + # # 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" tar zxvf "${KREW}.tar.gz" ./"${KREW}" install krew - export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH" + export PATH="$KREW_ROOT/bin:$PATH" set +e }