Merge 5f7d419458beeecc1898a0181c318cffe2601dc8 into 4beab63631764fc381a0e56273faf8d43b8f9509

This commit is contained in:
tim-mit 2024-08-07 09:39:53 +00:00 committed by GitHub
commit 7c9651a9a6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

6
nvm.sh
View File

@ -4492,7 +4492,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