-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Cannot source nvm.sh
if readonly VERSION
variable is defined
#3584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
readonly variables are exceedingly rare. Why do you have one set in your terminal? |
I agree, having a readonly variable in an interactive terminal is rare. Things might be different when it comes to automation: We have a build script for our CI that has to source IMO since NVM is implemented using shell functions it should not interfere (or at least as little as possible) with the normal use of the shell. |
That's true, and we can change it, but it won't solve the root problem - which I think is unsolvable. |
Can we change it |
See also #3257 |
Uh oh!
There was an error while loading. Please reload this page.
Sourcing
nvm.sh
fails if a readonly environment variableVERSION
(or some other readonly variables that nvm.sh uses) are defined. IMO nvm should use variables with a unique prefix even for local variables, in this case e.g.NVM_VERSION
.Operating system and version:
Ubuntu 24.04.2 LTS
nvm debug
output:nvm ls
output:How did you install
nvm
?Script in readme
What steps did you perform?
What happened?
Sourcing
nvm.sh
failed:What did you expect to happen?
Sourcing
nvm.sh
succeeds without error.The text was updated successfully, but these errors were encountered: