Skip to content
Myr

Make shasum the lowest priority checksum command.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

This fixes false "Checksums do not match" errors on systems where shasum is a symlink to sha256sum or otherwise.

authored by Kevin Wang · committed by Kevin Wang · parent fd9e01b · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:nvm.sh+3 added-3 removed
276 unmodified lines
277 return278}279280nvm_checksum() {281 if nvm_has "shasum"; then282 checksum=$(shasum $1 | \awk '{print $1}')281 if nvm_has "sha1sum"; then282 checksum=$(sha1sum $1 | \awk '{print $1}')283 elif nvm_has "sha1"; then284 checksum=$(sha1 -q $1)285 else286 checksum=$(sha1sum $1 | \awk '{print $1}')286 checksum=$(shasum $1 | \awk '{print $1}')287 fi288289 if [ "$checksum" = "$2" ]; then290 return
521 unmodified lines