mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Use NVM_DIR in installation instructions
As suggested by @ljharb, this might be a little cleaner. I'm not entirely sure, but in any case, it is consistent with the upgrade instructions, so that is nice.
This commit is contained in:
		| @@ -88,11 +88,11 @@ Or if you have `git` installed: | |||||||
| 1. activate nvm by sourcing it from your shell | 1. activate nvm by sourcing it from your shell | ||||||
|  |  | ||||||
| ```sh | ```sh | ||||||
| ( | export NVM_DIR="$HOME/.nvm" && ( | ||||||
|   git clone https://github.com/creationix/nvm.git ~/.nvm |   git clone https://github.com/creationix/nvm.git "$NVM_DIR" | ||||||
|   cd ~/.nvm |   cd "$NVM_DIR" | ||||||
|   git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin` |   git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin` | ||||||
| ) && . ~/.nvm/nvm.sh | ) && . "$NVM_DIR/nvm.sh" | ||||||
| ``` | ``` | ||||||
|  |  | ||||||
| Add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login: | Add these lines to your `~/.bashrc`, `~/.profile`, or `~/.zshrc` file to have it automatically sourced upon login: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user