mirror of
				https://github.com/lukechilds/zsh-nvm.git
				synced 2025-10-30 14:46:28 +08:00 
			
		
		
		
	Make sure we have binaries before trying to format them
Otherwise basename spits out errors #8
This commit is contained in:
		
							parent
							
								
									620000bab0
								
							
						
					
					
						commit
						007fd93fd7
					
				| @ -23,10 +23,17 @@ _zsh_nvm_install() { | ||||
| } | ||||
| 
 | ||||
| _zsh_nvm_global_binaries() { | ||||
|   echo "$NVM_DIR"/v0*/bin/*(N) "$NVM_DIR"/versions/*/*/bin/*(N) | | ||||
|     xargs -n 1 basename | | ||||
|     sort | | ||||
|     uniq | ||||
| 
 | ||||
|   # Look for global binaries | ||||
|   local global_binary_paths=$(echo "$NVM_DIR"/v0*/bin/*(N) "$NVM_DIR"/versions/*/*/bin/*(N)) | ||||
| 
 | ||||
|   # If we have some, format them | ||||
|   if [[ -n "$global_binary_paths" ]]; then | ||||
|     echo "$NVM_DIR"/v0*/bin/*(N) "$NVM_DIR"/versions/*/*/bin/*(N) | | ||||
|       xargs -n 1 basename | | ||||
|       sort | | ||||
|       uniq | ||||
|   fi | ||||
| } | ||||
| 
 | ||||
| _zsh_nvm_load() { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Luke Childs
						Luke Childs