File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -69,16 +69,18 @@ function nvm --description "Node version manager"
69
69
set --local os (command uname -s | string lower)
70
70
set --local ext tar.gz
71
71
set --local arch (command uname -m )
72
+ set --local tarcmd tar
72
73
73
74
switch $os
74
75
case aix
75
76
set arch ppc64
76
77
case sunos
77
78
case linux
78
79
case darwin
79
- case {MSYS_NT,MINGW \* _NT }\*
80
+ case {msys_nt,mingw \* _nt }\*
80
81
set os win
81
82
set ext zip
83
+ set tarcmd bsdtar
82
84
case \*
83
85
echo " nvm: Unsupported operating system: \" $os \" " >&2
84
86
return 1
@@ -115,7 +117,7 @@ function nvm --description "Node version manager"
115
117
end
116
118
117
119
if ! command curl -q $silent --progress-bar --location $url |
118
- command tar --extract --gzip --directory $nvm_data /$ver 2> /dev/null
120
+ command $tarcmd --extract --gzip --directory $nvm_data /$ver 2> /dev/null
119
121
command rm -rf $nvm_data /$ver
120
122
echo -e " \033[F\33[2K\x1b[0mnvm: Invalid mirror or host unavailable: \" $url \" " >&2
121
123
return 1
You can’t perform that action at this time.
0 commit comments