mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-22 23:40:30 +00:00
Add fallback input option to ensure that fallback is not used
This commit is contained in:
9
main.sh
9
main.sh
@@ -439,6 +439,12 @@ case "${enable_checksum}" in
|
||||
*) bail "'checksum' input option must be 'true' or 'false': '${enable_checksum}'" ;;
|
||||
esac
|
||||
|
||||
fallback="${INPUT_FALLBACK:-}"
|
||||
case "${fallback}" in
|
||||
none | cargo-binstall) ;;
|
||||
*) bail "'fallback' input option must be 'none' or 'cargo-binstall': '${fallback}'" ;;
|
||||
esac
|
||||
|
||||
# Refs: https://github.com/rust-lang/rustup/blob/HEAD/rustup-init.sh
|
||||
base_distro=""
|
||||
exe=""
|
||||
@@ -791,6 +797,9 @@ done
|
||||
|
||||
if [[ ${#unsupported_tools[@]} -gt 0 ]]; then
|
||||
IFS=','
|
||||
case "${fallback}" in
|
||||
none) bail "install-action does not support ${unsupported_tools[*]} (fallback is disabled by 'fallback: none' input option)" ;;
|
||||
esac
|
||||
info "install-action does not support ${unsupported_tools[*]}; fallback to cargo-binstall"
|
||||
IFS=$'\n\t'
|
||||
install_cargo_binstall
|
||||
|
||||
Reference in New Issue
Block a user