Support cargo-binstall fallback without cargo

This commit is contained in:
Taiki Endo
2024-06-02 01:08:59 +09:00
parent e5240ce0c5
commit 2d4372270d
5 changed files with 20 additions and 50 deletions

View File

@@ -748,5 +748,11 @@ if [[ ${#unsupported_tools[@]} -gt 0 ]]; then
# By default, cargo-binstall enforce downloads over secure transports only.
# As a result, http will be disabled, and it will also set
# min tls version to be 1.2
cargo binstall --force --no-confirm --locked "${unsupported_tools[@]}"
cargo-binstall binstall --force --no-confirm --locked "${unsupported_tools[@]}"
if ! type -P cargo >/dev/null; then
_bin_dir=$(canonicalize_windows_path "${HOME}/.cargo/bin")
# TODO: avoid this when already added
info "adding '${_bin_dir}' to PATH"
echo "${_bin_dir}" >>"${GITHUB_PATH}"
fi
fi