[Refactor] add nvm_get_artifact_compression

This commit is contained in:
nmarghetti authored and Jordan Harband committed 2021-01-02 00:03:24 +01:00
1 parent a5742d4e9e
commit d396181ffb
3 files changed
+40 -10

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
cleanup () {
unset -f die cleanup
}
die () { echo "$@" ; cleanup ; exit 1; }
\. ../../../nvm.sh
# nvm_get_artifact_compression by default
[ "$(nvm_get_artifact_compression)" = 'tar.gz' ] || die 'nvm_get_artifact_compression should return "tar.gz" by default'
# nvm_get_artifact_compression with xz
[ "$(nvm_get_artifact_compression "14.0.0")" = 'tar.xz' ] || die 'nvm_get_artifact_compression should return "tar.xz" for this version'
cleanup