mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 18:25:52 +08:00 
			
		
		
		
	[feature] Allow passing additional arguments to node
For example:
    nvm run v0.6.0 myApp.js
			
			
This commit is contained in:
		
							
								
								
									
										4
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -202,7 +202,7 @@ nvm() | |||||||
|     ;; |     ;; | ||||||
|     "run" ) |     "run" ) | ||||||
|       # run given version of node |       # run given version of node | ||||||
|       if [ $# -ne 2 ]; then |       if [ $# -lt 2 ]; then | ||||||
|         nvm help |         nvm help | ||||||
|         return |         return | ||||||
|       fi |       fi | ||||||
| @@ -212,7 +212,7 @@ nvm() | |||||||
|         return; |         return; | ||||||
|       fi |       fi | ||||||
|       echo "Running node $VERSION" |       echo "Running node $VERSION" | ||||||
|       $NVM_DIR/$VERSION/bin/node |       $NVM_DIR/$VERSION/bin/node "${@:3}" | ||||||
|     ;; |     ;; | ||||||
|     "ls" | "list" ) |     "ls" | "list" ) | ||||||
|       if [ $# -ne 1 ]; then |       if [ $# -ne 1 ]; then | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user