From a01c899aec1caa99ff115cdffceee4ca7a33807a Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 3 Jan 2017 21:26:18 +0700 Subject: [PATCH] Use double test brackets --- zsh-nvm.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index 6335442..a968aca 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -158,14 +158,14 @@ _zsh_nvm_auto_use() { local node_version="$(nvm version)" local nvmrc_path="$(nvm_find_nvmrc)" - if [ -n "$nvmrc_path" ]; then + if [[ -n "$nvmrc_path" ]]; then local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")") - if [ "$nvmrc_node_version" != "N/A" ] && [ "$nvmrc_node_version" != "$node_version" ]; then + if [[ "$nvmrc_node_version" != "N/A" ]] && [[ "$nvmrc_node_version" != "$node_version" ]]; then nvm use export NVM_AUTO_USE_ACTIVE=true fi - elif [ "$node_version" != "$(nvm version default)" ] && [ "$NVM_AUTO_USE_ACTIVE" = true ]; then + elif [[ "$node_version" != "$(nvm version default)" ]] && [[ "$NVM_AUTO_USE_ACTIVE" = true ]]; then echo "Reverting to nvm default version" nvm use default fi