Skip to content

Commit eabf640

Browse files
committed
compute_sha2: drop support for OS X Leopard
When computing the SHA-2 checksum, `openssl dgst` is a potential candidate if openssl was found in PATH. Previously, openssl from Homebrew would also get explicitly added to the candidates list because, historically, Homebrew did not link it to PATH, OS X Leopard did not have `shasum`, and system openssl could not calculate sha256 checksums. This drops support for OS X Leopard which last had an update 15 years ago. Ref. b396ad7
1 parent fdcfac8 commit eabf640

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bin/ruby-build

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,7 @@ compute_sha2() {
313313
output="$(shasum -a 256 -b)" || return 1
314314
echo "${output% *}"
315315
elif type openssl &>/dev/null; then
316-
local openssl
317-
openssl="$(command -v "$(brew --prefix openssl 2>/dev/null || true)"/bin/openssl openssl | head -1)"
318-
output="$("$openssl" dgst -sha256 2>/dev/null)" || return 1
316+
output="$(openssl dgst -sha256 2>/dev/null)" || return 1
319317
echo "${output##* }"
320318
elif type sha256sum &>/dev/null; then
321319
output="$(sha256sum -b)" || return 1

0 commit comments

Comments
 (0)