nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
MIT License
79.14k stars 7.92k forks source link

Ubuntu 21.04 install script does not hook into .zshrc but into .bashrc #2611

Open B3r opened 2 years ago

B3r commented 2 years ago

While installing nvm by install script in zsh, the download is successful, however the hook into zshrc does not take place. However it hooks into .bashrc

Operating system and version:

Ubuntu 21.04

How did you install nvm?

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

What happened?

Download of nvm into folder .nvm successful, however hooking into zshrc not happening

What did you expect to happen?

the .zshrc should be updated with this or something similar: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

Is there anything in any of your profile files that modifies the PATH?

Yes multiple additions to the PATH var like export PATH="[...]:$PATH"

ljharb commented 2 years ago

There's a lot of difficulty with reliably determining which profile file the setup lines should be installed into, unfortunately. What other profile files do you have in $HOME?