mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-26 19:41:34 +00:00
[Refactor] add nvm_get_checksum_binary
; use it in nvm debug
This commit is contained in:
20
test/fast/Unit tests/nvm_get_checksum_binary
Executable file
20
test/fast/Unit tests/nvm_get_checksum_binary
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
die () { echo "$@" ; exit 1; }
|
||||
|
||||
set +e # TODO: fix
|
||||
\. ../../../nvm.sh
|
||||
set -e
|
||||
|
||||
BIN="$(nvm_get_checksum_binary)"
|
||||
|
||||
case "${BIN-}" in
|
||||
sha256sum | shasum | sha256 | gsha256sum | openssl | bssl | sha1sum | sha1 | shasum)
|
||||
echo "${BIN} found"
|
||||
;;
|
||||
*)
|
||||
die "sha256sum | shasum | sha256 | gsha256sum | openssl | bssl | sha1sum | sha1 | shasum not found: found ${BIN}"
|
||||
;;
|
||||
esac
|
Reference in New Issue
Block a user