[Fix] allow checksums to pass with a leading backslash

See https://unix.stackexchange.com/a/555061/137489
Jordan Harband 2023-08-06 14:51:48 +12:00
parent 55075db96d
commit 324b81a722
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
1 changed files with 1 additions and 1 deletions

2
nvm.sh
View File

@ -1663,7 +1663,7 @@ nvm_compare_checksum() {
nvm_err "Computed checksum of '${FILE}' is empty." # missing in raspberry pi binary nvm_err "Computed checksum of '${FILE}' is empty." # missing in raspberry pi binary
nvm_err 'WARNING: Continuing *without checksum verification*' nvm_err 'WARNING: Continuing *without checksum verification*'
return return
elif [ "${COMPUTED_SUM}" != "${CHECKSUM}" ]; then elif [ "${COMPUTED_SUM}" != "${CHECKSUM}" ] && [ "${COMPUTED_SUM}" != "\\${CHECKSUM}" ]; then
nvm_err "Checksums do not match: '${COMPUTED_SUM}' found, '${CHECKSUM}' expected." nvm_err "Checksums do not match: '${COMPUTED_SUM}' found, '${CHECKSUM}' expected."
return 1 return 1
fi fi