mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 18:25:52 +08:00 
			
		
		
		
	[Refactor] install.sh: use curlies in a few places.
				
					
				
			This commit is contained in:
		
							
								
								
									
										16
									
								
								install.sh
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								install.sh
									
									
									
									
									
								
							| @@ -240,24 +240,24 @@ nvm_check_global_modules() { | |||||||
| } | } | ||||||
|  |  | ||||||
| nvm_do_install() { | nvm_do_install() { | ||||||
|   if [ -z "$METHOD" ]; then |   if [ -z "${METHOD}" ]; then | ||||||
|     # Autodetect install method |     # Autodetect install method | ||||||
|     if nvm_has "git"; then |     if nvm_has git; then | ||||||
|       install_nvm_from_git |       install_nvm_from_git | ||||||
|     elif nvm_has "nvm_download"; then |     elif nvm_has nvm_download; then | ||||||
|       install_nvm_as_script |       install_nvm_as_script | ||||||
|     else |     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 |     fi | ||||||
|   elif [ "~$METHOD" = "~git" ]; then |   elif [ "${METHOD}" = 'git' ]; then | ||||||
|     if ! nvm_has "git"; then |     if ! nvm_has git; then | ||||||
|       echo >&2 "You need git to install nvm" |       echo >&2 "You need git to install nvm" | ||||||
|       exit 1 |       exit 1 | ||||||
|     fi |     fi | ||||||
|     install_nvm_from_git |     install_nvm_from_git | ||||||
|   elif [ "~$METHOD" = "~script" ]; then |   elif [ "${METHOD}" = 'script' ]; then | ||||||
|     if ! nvm_has "nvm_download"; then |     if ! nvm_has nvm_download; then | ||||||
|       echo >&2 "You need curl or wget to install nvm" |       echo >&2 "You need curl or wget to install nvm" | ||||||
|       exit 1 |       exit 1 | ||||||
|     fi |     fi | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user