mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 18:25:52 +08:00 
			
		
		
		
	Prevent fallback
This commit is contained in:
		
							
								
								
									
										12
									
								
								install.sh
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								install.sh
									
									
									
									
									
								
							| @@ -61,13 +61,15 @@ install_as_script() { | |||||||
| } | } | ||||||
|  |  | ||||||
| if [ -z "$METHOD" ]; then | if [ -z "$METHOD" ]; then | ||||||
|  install_from_git || { |   # Autodetect install method | ||||||
|    echo >&2 "Install using git failed, falling to back to script" |   if has "git"; then | ||||||
|    install_as_script || { |     install_from_git | ||||||
|  |   elif has "curl" || has "wget"; then | ||||||
|  |     install_as_script | ||||||
|  |   else | ||||||
|     echo >&2 "You need git, curl or wget to install nvm" |     echo >&2 "You need git, curl or wget to install nvm" | ||||||
|     exit 1 |     exit 1 | ||||||
|    } |   fi | ||||||
|  } |  | ||||||
| else | else | ||||||
|   if [ "$METHOD" = "git" ]; then |   if [ "$METHOD" = "git" ]; then | ||||||
|     install_from_git || { |     install_from_git || { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user