mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Ensure that npm doesn't print out excess data, regardless of the user's log level.
				
					
				
			Fixes #881.
This commit is contained in:
		
							
								
								
									
										4
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -1352,10 +1352,10 @@ nvm_die_on_prefix() { | |||||||
|   fi |   fi | ||||||
|  |  | ||||||
|   local NVM_NPM_PREFIX |   local NVM_NPM_PREFIX | ||||||
|   NVM_NPM_PREFIX="$(npm config get prefix)" |   NVM_NPM_PREFIX="$(NPM_CONFIG_LOGLEVEL=warn npm config get prefix)" | ||||||
|   if ! (nvm_tree_contains_path "$NVM_DIR" "$NVM_NPM_PREFIX" >/dev/null 2>&1); then |   if ! (nvm_tree_contains_path "$NVM_DIR" "$NVM_NPM_PREFIX" >/dev/null 2>&1); then | ||||||
|     if [ "_$NVM_DELETE_PREFIX" = "_1" ]; then |     if [ "_$NVM_DELETE_PREFIX" = "_1" ]; then | ||||||
|       npm config delete prefix |       NPM_CONFIG_LOGLEVEL=warn npm config delete prefix | ||||||
|     else |     else | ||||||
|       nvm deactivate >/dev/null 2>&1 |       nvm deactivate >/dev/null 2>&1 | ||||||
|       echo >&2 "nvm is not compatible with the npm config \"prefix\" option: currently set to \"$NVM_NPM_PREFIX\"" |       echo >&2 "nvm is not compatible with the npm config \"prefix\" option: currently set to \"$NVM_NPM_PREFIX\"" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user