File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -3693,12 +3693,7 @@ nvm_supports_xz() {
3693
3693
3694
3694
local NVM_OS
3695
3695
NVM_OS=" $( nvm_get_os) "
3696
- if [ " _${NVM_OS} " = ' _linux' ]; then
3697
- if ! command which xz > /dev/null 2>&1 ; then
3698
- # Linux without xz on the PATH doesn't support extracting xz-compressed tarballs with tar
3699
- return 1
3700
- fi
3701
- elif [ " _${NVM_OS} " = ' _darwin' ]; then
3696
+ if [ " _${NVM_OS} " = ' _darwin' ]; then
3702
3697
local MACOS_VERSION
3703
3698
MACOS_VERSION=" $( sw_vers -productVersion) "
3704
3699
if nvm_version_greater " 10.9.0" " ${MACOS_VERSION} " ; then
@@ -3711,8 +3706,11 @@ nvm_supports_xz() {
3711
3706
return 1
3712
3707
fi
3713
3708
else
3714
- # Conservatively assume other operating systems don't support extracting xz-compressed tarballs with tar
3715
- return 1
3709
+ if ! command which xz > /dev/null 2>&1 ; then
3710
+ # Most OSes without xz on the PATH don't support extracting xz-compressed tarballs with tar
3711
+ # (Should correctly handle Linux, SmartOS, maybe more)
3712
+ return 1
3713
+ fi
3716
3714
fi
3717
3715
3718
3716
# all node versions v4.0.0 and later have xz
You can’t perform that action at this time.
0 commit comments