mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 18:25:52 +08:00 
			
		
		
		
	copy-packages: ensure that nvm_version is also applied to compare the provided version to the current one.
				
					
				
			This commit is contained in:
		
							
								
								
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -796,7 +796,7 @@ nvm() { | |||||||
|       local PROVIDED_VERSION |       local PROVIDED_VERSION | ||||||
|       PROVIDED_VERSION="$2" |       PROVIDED_VERSION="$2" | ||||||
|  |  | ||||||
|       if [ "$PROVIDED_VERSION" = "$(nvm_ls_current)" ]; then |       if [ "$PROVIDED_VERSION" = "$(nvm_ls_current)" ] || [ "$(nvm_version $PROVIDED_VERSION)" = "$(nvm_ls_current)" ]; then | ||||||
|         echo 'Can not copy packages from the current version of node.' >&2 |         echo 'Can not copy packages from the current version of node.' >&2 | ||||||
|         return 2 |         return 2 | ||||||
|       fi |       fi | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user