mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-10-31 01:45:50 +08:00
[New] maybe support Windows with WSL, MSYS, Cygwin
This commit is contained in:
committed by
Jordan Harband
parent
d118be8fd4
commit
f2582275f6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user