mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-14 01:33:44 +00:00
Merge 5f7d419458beeecc1898a0181c318cffe2601dc8 into 1aab8b2d5aa2b2de1e6931362ef26646413be851
This commit is contained in:
commit
1de1116ce4
6
nvm.sh
6
nvm.sh
@ -4556,7 +4556,11 @@ nvm_supports_xz() {
|
||||
if [ "_${NVM_OS}" = '_darwin' ]; then
|
||||
local MACOS_VERSION
|
||||
MACOS_VERSION="$(sw_vers -productVersion)"
|
||||
if nvm_version_greater "10.9.0" "${MACOS_VERSION}"; then
|
||||
if tar --version | command grep -q GNU && ! command which xz >/dev/null 2>&1; then
|
||||
# On macOS with GNU tar in use, and no xv on the path, xv-compressed
|
||||
# tarballs aren't supported
|
||||
return 1
|
||||
elif nvm_version_greater "10.9.0" "${MACOS_VERSION}"; then
|
||||
# macOS 10.8 and earlier doesn't support extracting xz-compressed tarballs with tar
|
||||
return 1
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user