Skip to content

Commit 460a6ef

Browse files
Fix sha256sum logic in install.sh script on Mac (#31)
1 parent c9dc61e commit 460a6ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,13 @@ verify_checksum() {
301301
formatted_checksum=$(printf "%s %s\n" "$(cat "${checksum_file}" | tr -d '[:space:]')" "${filename}")
302302

303303
if command -v sha256sum >/dev/null 2>&1; then
304-
if ! echo "${formatted_checksum}" | sha256sum -c >/dev/null 2>&1; then
304+
if ! echo "${formatted_checksum}" | sha256sum -c - >/dev/null 2>&1; then
305305
log_error "Checksum validation failed using sha256sum"
306306
log_error "For security reasons, installation has been aborted"
307307
exit 1
308308
fi
309309
elif command -v shasum >/dev/null 2>&1; then
310-
if ! echo "${formatted_checksum}" | shasum -a 256 -c >/dev/null 2>&1; then
310+
if ! echo "${formatted_checksum}" | shasum -a 256 -c - >/dev/null 2>&1; then
311311
log_error "Checksum validation failed using shasum"
312312
log_error "For security reasons, installation has been aborted"
313313
exit 1

0 commit comments

Comments
 (0)