From 814319d7c087319ce1c01378053cb3fbfd768fdf Mon Sep 17 00:00:00 2001 From: Kevin Wang Date: Tue, 26 Aug 2014 23:52:53 -0500 Subject: [PATCH] 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. --- nvm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nvm.sh b/nvm.sh index 500e472..71cbd9b 100644 --- a/nvm.sh +++ b/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