Skip to content

Commit fddb3e8

Browse files
committed
Only show PATH hint when ~/.local/bin is not already in PATH
1 parent ecb4f04 commit fddb3e8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

install.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ curl -sL "$URL" -o "${INSTALL_DIR}/reflex"
3838
chmod +x "${INSTALL_DIR}/reflex"
3939

4040
echo "Installed reflex ${TAG} to ${INSTALL_DIR}/reflex"
41-
echo ""
42-
echo "Make sure ${INSTALL_DIR} is in your PATH:"
43-
echo " export PATH=\"\$HOME/.local/bin:\$PATH\""
41+
42+
case ":$PATH:" in
43+
*":${INSTALL_DIR}:"*) ;;
44+
*) echo ""
45+
echo "Add ${INSTALL_DIR} to your PATH:"
46+
echo " export PATH=\"\$HOME/.local/bin:\$PATH\"" ;;
47+
esac

0 commit comments

Comments
 (0)