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

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

View File

@@ -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