From 7c2ddd9a0cd80ca4ce967f6f648db24f312583b6 Mon Sep 17 00:00:00 2001 From: Asger Hautop Drewsen Date: Wed, 2 Aug 2023 13:34:43 +0200 Subject: [PATCH] Don't show warning if $CARGO_HOME/bin is in $PATH (#1239) --- install-from-binstall-release.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install-from-binstall-release.sh b/install-from-binstall-release.sh index a9f5c99b..7dafe318 100755 --- a/install-from-binstall-release.sh +++ b/install-from-binstall-release.sh @@ -27,8 +27,11 @@ fi ./cargo-binstall -y --force cargo-binstall -if ! [[ ":$PATH:" == *":$HOME/.cargo/bin:"* ]]; then +if ! [[ $CARGO_HOME ]]; then + CARGO_HOME=$HOME/.cargo +fi +if ! [[ ":$PATH:" == *":$CARGO_HOME/bin:"* ]]; then echo - printf "\033[0;31mYour path is missing ~/.cargo/bin, you might want to add it.\033[0m\n" + printf "\033[0;31mYour path is missing %s, you might want to add it.\033[0m\n" "$CARGO_HOME/bin" echo fi