Skip to content

Commit 8b63bbf

Browse files
committed
nvm-env: workaround nvm-sh/nvm#3727
1 parent 36c5157 commit 8b63bbf

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎commands/nvm-env‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,12 @@ function nvm_env() (
7373
fi
7474

7575
# execute the command in new bash environment that doesn't inherit our strict mode
76+
# the nullglob is to fix: https://github.com/nvm-sh/nvm/issues/3727
7677
if [[ $option_rosetta == 'yes' ]]; then
7778
# only /bin/bash allows rosetta
78-
arch -x86_64 /bin/bash -c "source $DOROTHY/sources/nvm.sh; $cmd_exec"
79+
arch -x86_64 /bin/bash -c "shopt -s nullglob; source $DOROTHY/sources/nvm.sh; $cmd_exec"
7980
else
80-
bash -c "source $DOROTHY/sources/nvm.sh; $cmd_exec"
81+
bash -c "shopt -s nullglob; source $DOROTHY/sources/nvm.sh; $cmd_exec"
8182
fi
8283
)
8384

0 commit comments

Comments
 (0)