mirror of
				https://github.com/lukechilds/zsh-nvm.git
				synced 2025-10-30 14:46:28 +08:00 
			
		
		
		
	Do proper empty string test rather than truthy
Truthy doesn't seem to work on older versions of zsh 5.0.2 fails, 5.1 works
This commit is contained in:
		
							parent
							
								
									281614aacd
								
							
						
					
					
						commit
						0ccae77ce2
					
				| @ -62,7 +62,7 @@ nvm_update() { | ||||
| _zsh_nvm_upgrade() { | ||||
| 
 | ||||
|   # Use default upgrade if it's built in | ||||
|   if [[ "$(_zsh_nvm_nvm help | grep 'nvm upgrade')" ]]; then | ||||
|   if [[ -n "$(_zsh_nvm_nvm help | grep 'nvm upgrade')" ]]; then | ||||
|     _zsh_nvm_nvm upgrade | ||||
|     return | ||||
|   fi | ||||
| @ -88,7 +88,7 @@ _zsh_nvm_previous_version() { | ||||
| 
 | ||||
| _zsh_nvm_revert() { | ||||
|   local previous_version="$(_zsh_nvm_previous_version)" | ||||
|   if [[ $previous_version ]]; then | ||||
|   if [[ -n "$previous_version" ]]; then | ||||
|     local installed_version=$(cd "$NVM_DIR" && git describe --tags) | ||||
|     if [[ "$installed_version" = "$previous_version" ]]; then | ||||
|       echo "Already reverted to $installed_version" | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Luke Childs
						Luke Childs