mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 01:45:50 +08:00 
			
		
		
		
	Nicer failure message when trying to install an invalid version. Fixes #285.
This commit is contained in:
		
							
								
								
									
										5
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -308,6 +308,11 @@ nvm() { | ||||
|  | ||||
|       [ -d "$NVM_DIR/$VERSION" ] && echo "$VERSION is already installed." && return | ||||
|  | ||||
|       if [ "$VERSION" = "N/A" ]; then | ||||
|         echo "Version '$VERSION' not found - try \`nvm ls-remote\` to browse available versions." | ||||
|         return 3 | ||||
|       fi | ||||
|  | ||||
|       # skip binary install if no binary option specified. | ||||
|       if [ $nobinary -ne 1 ]; then | ||||
|         # shortcut - try the binary if possible. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user