mirror of
https://github.com/taiki-e/install-action.git
synced 2025-12-27 01:54:13 -05:00
Use here-string for shasum
This commit is contained in:
4
main.sh
4
main.sh
@@ -49,11 +49,11 @@ download_and_checksum() {
|
||||
if [[ -n "${checksum}" ]]; then
|
||||
info "verifying sha256 checksum for $(basename "${url}")"
|
||||
if type -P sha256sum &>/dev/null; then
|
||||
echo "${checksum} *tmp" | sha256sum -c - >/dev/null
|
||||
sha256sum -c - >/dev/null <<<"${checksum} *tmp"
|
||||
elif type -P shasum &>/dev/null; then
|
||||
# GitHub-hosted macOS runner does not install GNU Coreutils by default.
|
||||
# https://github.com/actions/runner-images/issues/90
|
||||
echo "${checksum} *tmp" | shasum -a 256 -c - >/dev/null
|
||||
shasum -a 256 -c - >/dev/null <<<"${checksum} *tmp"
|
||||
else
|
||||
bail "checksum requires 'sha256sum' or 'shasum' command; consider installing one of them or setting 'checksum' input option to 'false'"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user