mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Add special handling for node v0.6.21-pre
This commit is contained in:
		
							
								
								
									
										8
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -205,7 +205,13 @@ nvm_ls_current() { | |||||||
|   if [ $? -ne 0 ]; then |   if [ $? -ne 0 ]; then | ||||||
|     echo 'none' |     echo 'none' | ||||||
|   elif nvm_tree_contains_path "$NVM_DIR" "$NODE_PATH"; then |   elif nvm_tree_contains_path "$NVM_DIR" "$NODE_PATH"; then | ||||||
|     echo `node -v 2>/dev/null` |     local VERSION | ||||||
|  |     VERSION=`node -v 2>/dev/null` | ||||||
|  |     if [ "$VERSION" = "v0.6.21-pre" ]; then | ||||||
|  |       echo "v0.6.21" | ||||||
|  |     else | ||||||
|  |       echo "$VERSION" | ||||||
|  |     fi | ||||||
|   else |   else | ||||||
|     echo 'system' |     echo 'system' | ||||||
|   fi |   fi | ||||||
|   | |||||||
| @@ -8,3 +8,7 @@ nvm install 0.10 | |||||||
|  |  | ||||||
| [ "$(nvm current)" = "$(node -v)" ] || die "Failed to find current version: got \"$(nvm current)\", expected \"$(node -v)\"" | [ "$(nvm current)" = "$(node -v)" ] || die "Failed to find current version: got \"$(nvm current)\", expected \"$(node -v)\"" | ||||||
|  |  | ||||||
|  | nvm install 0.6.21 | ||||||
|  | [ "$(node -v)" = "v0.6.21-pre" ] || die "v0.6.21-pre not installed with v0.6.21" | ||||||
|  | [ "$(nvm current)" = "v0.6.21" ] || die "v0.6.21-pre not reported as v0.6.21" | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user