Make shasum the lowest priority checksum command.
This fixes false "Checksums do not match" errors on systems where shasum is a symlink to sha256sum or otherwise.master
parent
fd9e01b7e6
commit
814319d7c0
6
nvm.sh
6
nvm.sh
|
@ -278,12 +278,12 @@ nvm_ls_remote() {
|
|||
}
|
||||
|
||||
nvm_checksum() {
|
||||
if nvm_has "shasum"; then
|
||||
checksum=$(shasum $1 | \awk '{print $1}')
|
||||
if nvm_has "sha1sum"; then
|
||||
checksum=$(sha1sum $1 | \awk '{print $1}')
|
||||
elif nvm_has "sha1"; then
|
||||
checksum=$(sha1 -q $1)
|
||||
else
|
||||
checksum=$(sha1sum $1 | \awk '{print $1}')
|
||||
checksum=$(shasum $1 | \awk '{print $1}')
|
||||
fi
|
||||
|
||||
if [ "$checksum" = "$2" ]; then
|
||||
|
|
Loading…
Reference in New Issue