[Fix] nvm_supports_source_options: work around a bug in bash 3.2
See https://github.com/creationix/nvm/issues/1978#issuecomment-453480231 Fixes #1978.
This commit is contained in:
5
nvm.sh
5
nvm.sh
@@ -3559,7 +3559,10 @@ nvm_install_default_packages() {
|
||||
|
||||
nvm_supports_source_options() {
|
||||
# shellcheck disable=SC1091,SC2240
|
||||
[ "_$(nvm_echo '[ $# -gt 0 ] && nvm_echo $1' | . /dev/stdin yes 2>/dev/null)" = "_yes" ]
|
||||
[ "_$( . /dev/stdin yes 2> /dev/null <<'EOF'
|
||||
[ $# -gt 0 ] && nvm_echo $1
|
||||
EOF
|
||||
)" = "_yes" ]
|
||||
}
|
||||
|
||||
nvm_supports_xz() {
|
||||
|
||||
Reference in New Issue
Block a user