mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Should escape grep in copy-packages.
This commit is contained in:
		
							
								
								
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -748,7 +748,7 @@ nvm() { | |||||||
|  |  | ||||||
|       # declare local INSTALLS first, otherwise it doesn't work in zsh |       # declare local INSTALLS first, otherwise it doesn't work in zsh | ||||||
|       local INSTALLS |       local INSTALLS | ||||||
|       INSTALLS=$(nvm use $VERSION > /dev/null && npm list --global --parseable --depth=0 2> /dev/null | tail -n +2 | grep -o -e '/[^/]*$' | cut -c 2- | xargs) |       INSTALLS=$(nvm use $VERSION > /dev/null && npm list --global --parseable --depth=0 2> /dev/null | tail -n +2 | \grep -o -e '/[^/]*$' | cut -c 2- | xargs) | ||||||
|  |  | ||||||
|       npm install -g --quiet $INSTALLS |       npm install -g --quiet $INSTALLS | ||||||
|     ;; |     ;; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user