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() {
|
nvm_checksum() {
|
||||||
if nvm_has "shasum"; then
|
if nvm_has "sha1sum"; then
|
||||||
checksum=$(shasum $1 | \awk '{print $1}')
|
checksum=$(sha1sum $1 | \awk '{print $1}')
|
||||||
elif nvm_has "sha1"; then
|
elif nvm_has "sha1"; then
|
||||||
checksum=$(sha1 -q $1)
|
checksum=$(sha1 -q $1)
|
||||||
else
|
else
|
||||||
checksum=$(sha1sum $1 | \awk '{print $1}')
|
checksum=$(shasum $1 | \awk '{print $1}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$checksum" = "$2" ]; then
|
if [ "$checksum" = "$2" ]; then
|
||||||
|
|
Loading…
Reference in New Issue