Set PATH internally when cargo home is not available

This commit is contained in:
Taiki Endo
2022-07-25 19:38:45 +09:00
parent f343021ffc
commit d637ba13b3

View File

@@ -128,8 +128,10 @@ case "${OSTYPE}" in
cygwin* | msys*) exe=".exe" ;;
esac
cargo_bin="${CARGO_HOME:-$HOME/.cargo}/bin"
cargo_bin="${CARGO_HOME:-"$HOME/.cargo"}/bin"
mkdir -p "${cargo_bin}"
# For version check. It is intentional that this is not wrote in GITHUB_ENV.
export PATH="${cargo_bin}:$PATH"
for tool in "${tools[@]}"; do
if [[ "${tool}" == *"@"* ]]; then