mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Make nvm ls-remote return nvm_ls_remote's exit code.
				
					
				
			This commit is contained in:
		
							
								
								
									
										9
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -296,7 +296,7 @@ nvm_ls() { | |||||||
|  |  | ||||||
| nvm_ls_remote() { | nvm_ls_remote() { | ||||||
|   local PATTERN |   local PATTERN | ||||||
|   PATTERN=$1 |   PATTERN="$1" | ||||||
|   local VERSIONS |   local VERSIONS | ||||||
|   local GREP_OPTIONS |   local GREP_OPTIONS | ||||||
|   GREP_OPTIONS='' |   GREP_OPTIONS='' | ||||||
| @@ -798,8 +798,11 @@ nvm() { | |||||||
|       return $NVM_LS_EXIT_CODE |       return $NVM_LS_EXIT_CODE | ||||||
|     ;; |     ;; | ||||||
|     "ls-remote" | "list-remote" ) |     "ls-remote" | "list-remote" ) | ||||||
|       nvm_print_versions "`nvm_ls_remote $2`" |       local NVM_LS_EXIT_CODE | ||||||
|       return |       NVM_LS_OUTPUT=$(nvm_ls_remote "$2") | ||||||
|  |       NVM_LS_EXIT_CODE=$? | ||||||
|  |       nvm_print_versions "$NVM_LS_OUTPUT" | ||||||
|  |       return $NVM_LS_EXIT_CODE | ||||||
|     ;; |     ;; | ||||||
|     "current" ) |     "current" ) | ||||||
|       nvm_version current |       nvm_version current | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user