[New] maybe support Windows with WSL, MSYS, Cygwin

This commit is contained in:
nmarghetti authored and Jordan Harband committed 2021-01-02 00:03:24 +01:00
1 parent d118be8fd4
commit f2582275f6
6 files changed
+186 -21

No files matched your search

@@ -2,7 +2,7 @@
cleanup () {
rm -rf "$NVM_DIR"
unset -f die cleanup check_version
unset -f die cleanup nvm_get_os check_version
unset NVM_DIR NODE_PATH
}
die () { echo "$@" ; cleanup ; exit 1; }
@@ -44,4 +44,11 @@ type nvm_is_version_installed > /dev/null 2>&1 || die 'nvm_is_version_installed
check_version '12.0.0' 'node'
# Checking for Windows
nvm_get_os() {
echo "win"
}
check_version '13.0.0' 'node.exe'
cleanup