Skip to content

Commit

Permalink
krew user home
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Maria Cultrera committed Oct 14, 2023
1 parent 1144a3a commit 3effacc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/krew/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,15 @@ fi
./"${KREW}" install krew
)

echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:${PATH}"' >> "$HOME/.bashrc"
if [ -n "$_REMOTE_USER" ] ; then
mkdir -p $_REMOTE_USER_HOME/.krew/bin
mv /root/.krew/bin/kubectl-krew $_REMOTE_USER_HOME/.krew/bin/
chown $_REMOTE_USER $_REMOTE_USER_HOME/.krew/bin/kubectl-krew
echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:${PATH}"' >> "$_REMOTE_USER_HOME/.bashrc"
else
echo 'export PATH="${KREW_ROOT:-$HOME/.krew}/bin:${PATH}"' >> "$HOME/.bashrc"
fi


find / -name kubectl-krew 2> /dev/null

Expand Down

0 comments on commit 3effacc

Please sign in to comment.