Add cargo-binstall installation path to GITHUB_PATH ()

* Add cargo-binstall installation path to GITHUB_PATH in install-from-binstall-release.sh

Fixed 

* Add cargo-binstall installation path to GITHUB_PATH in install-from-binstall-release.ps1

* Update install-script.yml to test

* Fix use of env var in install-from-binstall-release.ps1
This commit is contained in:
Jiahao XU 2024-06-13 23:43:39 +10:00 committed by GitHub
parent 9a270f03b6
commit 05f488322e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 14 additions and 9 deletions

View file

@ -36,7 +36,11 @@ fi
CARGO_HOME="${CARGO_HOME:-$HOME/.cargo}"
if ! [[ ":$PATH:" == *":$CARGO_HOME/bin:"* ]]; then
echo
printf "\033[0;31mYour path is missing %s, you might want to add it.\033[0m\n" "$CARGO_HOME/bin"
echo
if [ -n "$CI" ] && [ -n "$GITHUB_PATH" ]; then
echo "$CARGO_HOME/bin" >> "$GITHUB_PATH"
else
echo
printf "\033[0;31mYour path is missing %s, you might want to add it.\033[0m\n" "$CARGO_HOME/bin"
echo
fi
fi