mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 18:25:52 +08:00 
			
		
		
		
	Make sure that nvm reinstall-packages system has the right std output.
				
					
				
			This commit is contained in:
		
							
								
								
									
										3
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -1712,14 +1712,15 @@ $NVM_LS_REMOTE_IOJS_OUTPUT" | command grep -v "N/A" | sed '/^$/d')" | |||||||
|       fi |       fi | ||||||
|  |  | ||||||
|       local NPMLIST |       local NPMLIST | ||||||
|  |       local VERSION | ||||||
|       if [ "_$PROVIDED_VERSION" = "_system" ]; then |       if [ "_$PROVIDED_VERSION" = "_system" ]; then | ||||||
|         if ! nvm_has_system_node && ! nvm_has_system_iojs; then |         if ! nvm_has_system_node && ! nvm_has_system_iojs; then | ||||||
|           echo 'No system version of node or io.js detected.' >&2 |           echo 'No system version of node or io.js detected.' >&2 | ||||||
|           return 3 |           return 3 | ||||||
|         fi |         fi | ||||||
|  |         VERSION="system" | ||||||
|         NPMLIST=$(nvm deactivate > /dev/null && npm list -g --depth=0 | command tail -n +2) |         NPMLIST=$(nvm deactivate > /dev/null && npm list -g --depth=0 | command tail -n +2) | ||||||
|       else |       else | ||||||
|         local VERSION |  | ||||||
|         VERSION="$(nvm_version "$PROVIDED_VERSION")" |         VERSION="$(nvm_version "$PROVIDED_VERSION")" | ||||||
|         NPMLIST=$(nvm use "$VERSION" > /dev/null && npm list -g --depth=0 | command tail -n +2) |         NPMLIST=$(nvm use "$VERSION" > /dev/null && npm list -g --depth=0 | command tail -n +2) | ||||||
|       fi |       fi | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user