From 2b2b15504c6af5b1286cdc896070e32024beddcf Mon Sep 17 00:00:00 2001 From: Ben Firestone Date: Sun, 25 Oct 2026 16:20:19 -0600 Subject: [PATCH] fix(install): compare digests instead of sha256sum -c macOS 15 ships a BSD sha256sum in /sbin that rejects GNU's --quiet flag. The installer preferred that tool and reported the usage error as a checksum mismatch. Hashing the tarball and comparing the digest string works with GNU, BSD and shasum alike. --- scripts/install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 02cd5fc..9415892 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -64,11 +64,15 @@ echo "downloading ${asset}" curl -fsSL -o "${tmp}/${asset}" "${base}/${asset}" || die "no asset ${asset} in release ${TAG}" curl -fsSL -o "${tmp}/checksums.txt" "${base}/checksums.txt" || die "release ${TAG} has no checksums.txt" +# Compare digests by hand: macOS 15 ships a BSD sha256sum without GNU's --quiet. +want=$(grep " ${asset}\$" "${tmp}/checksums.txt" | cut -d' ' -f1) +[ -n "$want" ] || die "no checksum for ${asset} in checksums.txt" if command -v sha256sum >/dev/null; then - (cd "$tmp" && grep " ${asset}\$" checksums.txt | sha256sum -c --quiet) || die "checksum mismatch for ${asset}" + got=$(sha256sum "${tmp}/${asset}" | cut -d' ' -f1) else - (cd "$tmp" && grep " ${asset}\$" checksums.txt | shasum -a 256 -c --quiet) || die "checksum mismatch for ${asset}" + got=$(shasum -a 256 "${tmp}/${asset}" | cut -d' ' -f1) fi +[ "$want" = "$got" ] || die "checksum mismatch for ${asset}" tar -xzf "${tmp}/${asset}" -C "$tmp" argus