This website works better with JavaScript.
Explore
Help
Sign In
alvis
/
nvm
Watch
1
Star
0
Fork
You've already forked nvm
0
Code
Issues
Pull Requests
Releases
Wiki
Activity
1444
Commits
1
Branch
90
Tags
3.7 MiB
Tree:
d12ccb130d
nvm
/
test
/
fast
/
Sourcing nvm.sh should not ...
8 lines
61 B
Raw
Normal View
History
Unescape
Escape
Do not modify parameters of sourcing script in zsh When sourcing a script without parameters in zsh the sourced scripts gets the same parameters as the sourcing file and is able to modify these parameters. Prevent nvm from removing all parameters of sourcing script by processing a copy of the parameters in a function.
9 years ago
#!/bin/sh
[Tests] use `-ex` option during tests when possible Relates to #1130
9 years ago
set -ex
Do not modify parameters of sourcing script in zsh When sourcing a script without parameters in zsh the sourced scripts gets the same parameters as the sourcing file and is able to modify these parameters. Prevent nvm from removing all parameters of sourcing script by processing a copy of the parameters in a function.
9 years ago
set -- yes
. ../../nvm.sh
[ "$1" = yes ]