Skip to content

Commit

Permalink
fix: updating tests in install.sh to detect missing preferred bin fol…
Browse files Browse the repository at this point in the history
…der.
  • Loading branch information
ratmav committed Oct 11, 2024
1 parent 8d8e7bc commit 2651d3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ ensure_bin_folder() {
echo "Or set PREFERRED_BIN_FOLDER to a writable directory."
exit 1
fi
# verify if PREFERRED_BIN_FOLDER is in PATH or exit with advice.
if ! [ -n "$PATH" ] && [ -n "$HOME" ] && echo "$PATH" | grep -q ":$HOME/.local/bin:"; then

if [ -z "$PATH" ] || [ -z "$HOME" ] || ! echo $PATH | grep -qE ":?$PREFERRED_BIN_FOLDER:?"; then
echo "Your PATH is missing $PREFERRED_BIN_FOLDER."
echo "Please add the following line to your shell profile file (e.g. ~/.bashrc, ~/.zshrc, etc.)"
echo "export PATH=\$PATH:$PREFERRED_BIN_FOLDER"
Expand Down

0 comments on commit 2651d3d

Please sign in to comment.