nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rm doesn't remove the directory via the environmental variable

CodingLama opened this issue · comments

Operating system and version:

Ubuntu 22.04.3 LTS

nvm debug output:

nvm ls output:

How did you install nvm?

wget command via terminal

What steps did you perform?

  1. nvm unload
  2. $ rm -rf "$NVM_DIR"

What happened?

nothing

What did you expect to happen?

$HOME/.nvm would be deleted

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

".profile":

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

ah, that's true, since nvm unload unsets NVM_DIR. We'll need to flip the order in the readme.

Fixed by #3302.