mirror of
				https://github.com/lukechilds/zsh-nvm.git
				synced 2025-10-30 14:46:28 +08:00 
			
		
		
		
	Add ZSH_NVM_NO_LOAD option
If ZSH_NVM_NO_LOAD is set to true then zsh-nvm won't actually do anything after setting up environment variables and functions. This is usefull for unit tests and debugging.
This commit is contained in:
		
							parent
							
								
									f8e0c4c5de
								
							
						
					
					
						commit
						be4db872ed
					
				| @ -144,12 +144,17 @@ _zsh_nvm_revert() { | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| # Install nvm if it isn't already installed | ||||
| [[ ! -f "$NVM_DIR/nvm.sh" ]] && _zsh_nvm_install | ||||
| # Don't init anything if this is true (debug/testing only) | ||||
| if [[ "$ZSH_NVM_NO_LOAD" != true ]]; then | ||||
| 
 | ||||
| # If nvm is installed | ||||
| if [[ -f "$NVM_DIR/nvm.sh" ]]; then | ||||
|   # Install nvm if it isn't already installed | ||||
|   [[ ! -f "$NVM_DIR/nvm.sh" ]] && _zsh_nvm_install | ||||
| 
 | ||||
|   # If nvm is installed | ||||
|   if [[ -f "$NVM_DIR/nvm.sh" ]]; then | ||||
| 
 | ||||
|     # Load it | ||||
|     [[ "$NVM_LAZY_LOAD" == true ]] && _zsh_nvm_lazy_load || _zsh_nvm_load | ||||
|   fi | ||||
| 
 | ||||
|   # Load it | ||||
|   [[ "$NVM_LAZY_LOAD" == true ]] && _zsh_nvm_lazy_load || _zsh_nvm_load | ||||
| fi | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Luke Childs
						Luke Childs