Skip to content

Commit

Permalink
Only nvm install if we can't nvm use
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Jan 5, 2017
1 parent 40e4097 commit 337984d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,11 @@ load-nvmrc() {
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" ]; then
if [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
else
nvm install
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
Expand Down

0 comments on commit 337984d

Please sign in to comment.