mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 18:25:52 +08:00 
			
		
		
		
	Fixed incorrect sorting of versions
This commit is contained in:
		
				
					committed by
					
						 Lucian Holland
						Lucian Holland
					
				
			
			
				
	
			
			
			
						parent
						
							8dad534464
						
					
				
				
					commit
					6f994715d6
				
			
							
								
								
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -38,7 +38,7 @@ nvm_version() | |||||||
|         return |         return | ||||||
|     fi |     fi | ||||||
|     if [ ! "$VERSION" ]; then |     if [ ! "$VERSION" ]; then | ||||||
|         VERSION=`(cd $NVM_DIR; \ls -d v${PATTERN}* 2>/dev/null) | sort -t. -k 2,1n -k 2,2n -k 3,3n | tail -n1` |         VERSION=`(cd $NVM_DIR; \ls -d v${PATTERN}* 2>/dev/null) | sort -t. -k 1.2,1n -k 2,2n -k 3,3n | tail -n1` | ||||||
|     fi |     fi | ||||||
|     if [ ! "$VERSION" ]; then |     if [ ! "$VERSION" ]; then | ||||||
|         echo "N/A" |         echo "N/A" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user