mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 18:25:52 +08:00 
			
		
		
		
	[shellcheck] fix incorrect A && B || C usages.
				
					
				
			This commit is contained in:
		
							
								
								
									
										14
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -796,7 +796,7 @@ nvm_ls() { | |||||||
|     local ZSH_HAS_SHWORDSPLIT_UNSET |     local ZSH_HAS_SHWORDSPLIT_UNSET | ||||||
|     ZSH_HAS_SHWORDSPLIT_UNSET=1 |     ZSH_HAS_SHWORDSPLIT_UNSET=1 | ||||||
|     if nvm_has "setopt"; then |     if nvm_has "setopt"; then | ||||||
|       ZSH_HAS_SHWORDSPLIT_UNSET="$(setopt | nvm_grep shwordsplit > /dev/null && nvm_echo $? || nvm_echo $?)" |       ZSH_HAS_SHWORDSPLIT_UNSET="$(set +e ; setopt | nvm_grep shwordsplit > /dev/null ; nvm_echo $?)" | ||||||
|       setopt shwordsplit |       setopt shwordsplit | ||||||
|     fi |     fi | ||||||
|  |  | ||||||
| @@ -949,7 +949,7 @@ nvm_ls_remote_index_tab() { | |||||||
|   fi |   fi | ||||||
|   ZSH_HAS_SHWORDSPLIT_UNSET=1 |   ZSH_HAS_SHWORDSPLIT_UNSET=1 | ||||||
|   if nvm_has "setopt"; then |   if nvm_has "setopt"; then | ||||||
|     ZSH_HAS_SHWORDSPLIT_UNSET="$(setopt | nvm_grep shwordsplit > /dev/null && nvm_echo $? || nvm_echo $?)" |     ZSH_HAS_SHWORDSPLIT_UNSET="$(set +e ; setopt | nvm_grep shwordsplit > /dev/null ; nvm_echo $?)" | ||||||
|     setopt shwordsplit |     setopt shwordsplit | ||||||
|   fi |   fi | ||||||
|   local VERSION_LIST |   local VERSION_LIST | ||||||
| @@ -1188,7 +1188,7 @@ nvm_print_implicit_alias() { | |||||||
|  |  | ||||||
|       ZSH_HAS_SHWORDSPLIT_UNSET=1 |       ZSH_HAS_SHWORDSPLIT_UNSET=1 | ||||||
|       if nvm_has "setopt"; then |       if nvm_has "setopt"; then | ||||||
|         ZSH_HAS_SHWORDSPLIT_UNSET="$(setopt | nvm_grep shwordsplit > /dev/null && nvm_echo $? || nvm_echo $?)" |         ZSH_HAS_SHWORDSPLIT_UNSET="$(set +e ; setopt | nvm_grep shwordsplit > /dev/null ; nvm_echo $?)" | ||||||
|         setopt shwordsplit |         setopt shwordsplit | ||||||
|       fi |       fi | ||||||
|  |  | ||||||
| @@ -1223,7 +1223,7 @@ nvm_print_implicit_alias() { | |||||||
|  |  | ||||||
|       ZSH_HAS_SHWORDSPLIT_UNSET=1 |       ZSH_HAS_SHWORDSPLIT_UNSET=1 | ||||||
|       if nvm_has "setopt"; then |       if nvm_has "setopt"; then | ||||||
|         ZSH_HAS_SHWORDSPLIT_UNSET="$(setopt | nvm_grep shwordsplit > /dev/null && nvm_echo $? || nvm_echo $?)" |         ZSH_HAS_SHWORDSPLIT_UNSET="$(set +e ; setopt | nvm_grep shwordsplit > /dev/null ; nvm_echo $?)" | ||||||
|         setopt shwordsplit |         setopt shwordsplit | ||||||
|       fi |       fi | ||||||
|  |  | ||||||
| @@ -1242,7 +1242,7 @@ nvm_print_implicit_alias() { | |||||||
|  |  | ||||||
|   ZSH_HAS_SHWORDSPLIT_UNSET=1 |   ZSH_HAS_SHWORDSPLIT_UNSET=1 | ||||||
|   if nvm_has "setopt"; then |   if nvm_has "setopt"; then | ||||||
|     ZSH_HAS_SHWORDSPLIT_UNSET="$(setopt | nvm_grep shwordsplit > /dev/null && nvm_echo $? || nvm_echo $?)" |     ZSH_HAS_SHWORDSPLIT_UNSET="$(set +e ; setopt | nvm_grep shwordsplit > /dev/null ; nvm_echo $?)" | ||||||
|     setopt shwordsplit |     setopt shwordsplit | ||||||
|   fi |   fi | ||||||
|   for MINOR in $LAST_TWO; do |   for MINOR in $LAST_TWO; do | ||||||
| @@ -1967,7 +1967,7 @@ nvm() { | |||||||
|       local ZSH_HAS_SHWORDSPLIT_UNSET |       local ZSH_HAS_SHWORDSPLIT_UNSET | ||||||
|       ZSH_HAS_SHWORDSPLIT_UNSET=1 |       ZSH_HAS_SHWORDSPLIT_UNSET=1 | ||||||
|       if nvm_has "setopt"; then |       if nvm_has "setopt"; then | ||||||
|         ZSH_HAS_SHWORDSPLIT_UNSET="$(setopt | nvm_grep shwordsplit > /dev/null && nvm_echo $? || nvm_echo $?)" |         ZSH_HAS_SHWORDSPLIT_UNSET="$(set +e ; setopt | nvm_grep shwordsplit > /dev/null ; nvm_echo $?)" | ||||||
|         setopt shwordsplit |         setopt shwordsplit | ||||||
|       fi |       fi | ||||||
|       nvm_err "nvm --version: v$(nvm --version)" |       nvm_err "nvm --version: v$(nvm --version)" | ||||||
| @@ -2479,7 +2479,7 @@ nvm() { | |||||||
|       local ZSH_HAS_SHWORDSPLIT_UNSET |       local ZSH_HAS_SHWORDSPLIT_UNSET | ||||||
|       ZSH_HAS_SHWORDSPLIT_UNSET=1 |       ZSH_HAS_SHWORDSPLIT_UNSET=1 | ||||||
|       if nvm_has "setopt"; then |       if nvm_has "setopt"; then | ||||||
|         ZSH_HAS_SHWORDSPLIT_UNSET="$(setopt | nvm_grep shwordsplit > /dev/null && nvm_echo $? || nvm_echo $?)" |         ZSH_HAS_SHWORDSPLIT_UNSET="$(set +e ; setopt | nvm_grep shwordsplit > /dev/null ; nvm_echo $?)" | ||||||
|         setopt shwordsplit |         setopt shwordsplit | ||||||
|       fi |       fi | ||||||
|       local LTS_ARG |       local LTS_ARG | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user