mirror of
https://github.com/taiki-e/install-action.git
synced 2026-04-21 15:10:27 +00: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
|
if [[ -n "${checksum}" ]]; then
|
||||||
info "verifying sha256 checksum for $(basename "${url}")"
|
info "verifying sha256 checksum for $(basename "${url}")"
|
||||||
if type -P sha256sum &>/dev/null; then
|
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
|
elif type -P shasum &>/dev/null; then
|
||||||
# GitHub-hosted macOS runner does not install GNU Coreutils by default.
|
# GitHub-hosted macOS runner does not install GNU Coreutils by default.
|
||||||
# https://github.com/actions/runner-images/issues/90
|
# 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
|
else
|
||||||
bail "checksum requires 'sha256sum' or 'shasum' command; consider installing one of them or setting 'checksum' input option to 'false'"
|
bail "checksum requires 'sha256sum' or 'shasum' command; consider installing one of them or setting 'checksum' input option to 'false'"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user