mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 01:45:50 +08:00 
			
		
		
		
	handle echo implementations that do not support -e
				
					
				
			This commit is contained in:
		
							
								
								
									
										7
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -26,6 +26,9 @@ if [ ! -d "$NVM_DIR" ]; then | ||||
|   fi | ||||
| fi | ||||
|  | ||||
| DASH_E="" | ||||
| [ -z "$(echo -n -e)" ] && DASH_E="-e" | ||||
|  | ||||
| # Setup mirror location if not already set | ||||
| if [ -z "$NVM_NODEJS_ORG_MIRROR" ]; then | ||||
|   export NVM_NODEJS_ORG_MIRROR="http://nodejs.org/dist" | ||||
| @@ -139,7 +142,7 @@ nvm_checksum() { | ||||
| } | ||||
|  | ||||
| colorize_version() { | ||||
|   echo -e "\033[0;34m$1\033[0m" | ||||
|   echo $DASH_E "\033[0;34m$1\033[0m" | ||||
| } | ||||
|  | ||||
| print_versions() { | ||||
| @@ -482,7 +485,7 @@ nvm() { | ||||
|         return | ||||
|     ;; | ||||
|     "current" ) | ||||
|       echo -ne "current: \t"; nvm_version current | ||||
|       echo $DASH_E -n "current: \t"; nvm_version current | ||||
|     ;; | ||||
|     "alias" ) | ||||
|       mkdir -p $NVM_DIR/alias | ||||
|   | ||||
		Reference in New Issue
	
	Block a user