mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	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.
This commit is contained in:
		
							
								
								
									
										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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user