mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	add v to version if user does not specify it to simplify commands
This commit is contained in:
		
							
								
								
									
										4
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -23,6 +23,10 @@ nvm_version() | ||||
|     # The default version is the current one | ||||
|     if [ ! "$PATTERN" ]; then | ||||
|         PATTERN='current' | ||||
|     elif [ "${PATTERN:0:1}" != "v" ]; then | ||||
|         if [ "$PATTERN" != "default" -a "$PATTERN" != "current" ]; then | ||||
|             PATTERN=v$PATTERN | ||||
|         fi | ||||
|     fi | ||||
|  | ||||
|     VERSION=`nvm_ls $PATTERN | tail -n1` | ||||
|   | ||||
		Reference in New Issue
	
	Block a user