mirror of
				https://github.com/nvm-sh/nvm.git
				synced 2025-10-31 10:15:53 +08:00 
			
		
		
		
	Changes $path var to $node_path
Avoids obliteration of $path set earlier by Prezto/zsh. Stomping on $path causes dirname to not be in the PATH resulting in an error.
This commit is contained in:
		
							
								
								
									
										6
									
								
								nvm.sh
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								nvm.sh
									
									
									
									
									
								
							| @@ -56,10 +56,10 @@ fi | |||||||
| nvm_tree_contains_path() { | nvm_tree_contains_path() { | ||||||
|   local tree |   local tree | ||||||
|   tree="$1" |   tree="$1" | ||||||
|   local path |   local node_path | ||||||
|   path="$2" |   node_path="$2" | ||||||
|   local pathdir |   local pathdir | ||||||
|   pathdir=$(dirname "$path") |   pathdir=$(dirname "$node_path") | ||||||
|   while [ "$pathdir" != "" ] && [ "$pathdir" != "." ] && [ "$pathdir" != "/" ] && [ "$pathdir" != "$tree" ]; do |   while [ "$pathdir" != "" ] && [ "$pathdir" != "." ] && [ "$pathdir" != "/" ] && [ "$pathdir" != "$tree" ]; do | ||||||
|     pathdir=$(dirname "$pathdir") |     pathdir=$(dirname "$pathdir") | ||||||
|   done |   done | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user