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.
This commit is contained in:
1 parent
dc9020b133
commit
7135873f80
2 files changed
+24
-13
No files matched your search
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -- yes
|
||||
. ../../nvm.sh
|
||||
[ "$1" = yes ]
|
||||
Reference in new issue
Block a user