Skip to content

fix(install): compare digests instead of sha256sum -c - #9

Merged
bfirestone merged 1 commit into
mainfrom
fix/install-macos-sha256sum
Oct 25, 2026
Merged

bfirestone merged 1 commit into
mainfrom
fix/install-macos-sha256sum

Conversation

@bfirestone

Copy link
Copy Markdown
Contributor

Running the install one-liner on macOS 15 failed with usage: sha256sum [-bctwz] and a bogus checksum mismatch. Apple now ships a BSD sha256sum in /sbin, and the script preferred it over shasum while passing the GNU-only --quiet flag.

The script now extracts the expected digest from checksums.txt, hashes the tarball with whichever tool exists, and compares the two strings. It also dies with a clear message when the asset has no line in checksums.txt.

Verify on a Mac: ARGUS_INSTALL_DIR=$(mktemp -d) bash scripts/install.sh --tag=v0.7.0 installs and runs. A tarball with a wrong digest is still rejected.

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.
@bfirestone
bfirestone merged commit 9182afe into main Oct 25, 2026
1 check passed
@bfirestone
bfirestone deleted the fix/install-macos-sha256sum branch October 25, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant