mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-19 12:03:43 +00:00
Compare commits
4 Commits
e47c203a59
...
7c9651a9a6
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7c9651a9a6 | ||
![]() |
4beab63631 | ||
![]() |
5f7d419458 | ||
![]() |
b42c165667 |
18
nvm.sh
18
nvm.sh
@ -503,9 +503,9 @@ $(nvm_wrap_with_color_code 'y' "${warn_text}")"
|
||||
}
|
||||
|
||||
nvm_process_nvmrc() {
|
||||
local NVMRC_PATH="$1"
|
||||
local NVMRC_PATH
|
||||
NVMRC_PATH="$1"
|
||||
local lines
|
||||
local unpaired_line
|
||||
|
||||
lines=$(command sed 's/#.*//' "$NVMRC_PATH" | command sed 's/^[[:space:]]*//;s/[[:space:]]*$//' | nvm_grep -v '^$')
|
||||
|
||||
@ -515,8 +515,12 @@ nvm_process_nvmrc() {
|
||||
fi
|
||||
|
||||
# Initialize key-value storage
|
||||
local keys=''
|
||||
local values=''
|
||||
local keys
|
||||
keys=''
|
||||
local values
|
||||
values=''
|
||||
local unpaired_line
|
||||
unpaired_line=''
|
||||
|
||||
while IFS= read -r line; do
|
||||
if [ -z "${line}" ]; then
|
||||
@ -4488,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user