Compare commits

...

4 Commits

Author SHA1 Message Date
tim-mit
0ef2bcd497
Merge 5f7d419458beeecc1898a0181c318cffe2601dc8 into 762f9ef9d17623b45095e8ca1a996c8928f3f424 2024-07-07 21:11:36 +09:00
Jordan Harband
762f9ef9d1
[Tests] only install python 2.7 if not already installed
See ee6f7667 / #3067
2024-07-06 10:29:55 -05:00
tim-mit
5f7d419458
Merge branch 'master' into issue3034 2023-08-27 19:10:32 +12:00
Tim Toomey
b42c165667 [Fix] gracefully handle GNU tar on MacOS during nvm install
GNU tar doesn't support using the -J flag required to unpack
xz-compressed tarballs when xv isn't installed. Check for this
scenario and fallback to using gzip-compressed tarballs.

Fixes #3034
2023-08-27 18:49:27 +12:00
2 changed files with 6 additions and 2 deletions

View File

@ -32,7 +32,7 @@ before_install:
- zsh --version
- dpkg -s dash | grep ^Version | awk '{print $2}'
# install python
- pyenv install 2.7.18
- pyenv local 2.7.18 || pyenv install 2.7.18
- pyenv local 2.7.18 || echo 'pyenv failed'
- python -V
install:

6
nvm.sh
View File

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