Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

Only nvm install if we can't nvm use#1378

Merged
ljharb merged 1 commit intonvm-sh:masterfrom
lukechilds:auto-use
Jan 5, 2017
Merged

Only nvm install if we can't nvm use#1378
ljharb merged 1 commit intonvm-sh:masterfrom
lukechilds:auto-use

Conversation

@lukechilds
Copy link
Contributor

Resolves #1377

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a duplicate of #1357?

README.markdown Outdated

if [ "$nvmrc_node_version" != "N/A" ] && [ "$nvmrc_node_version" != "$node_version" ]; then
if [ "$nvmrc_node_version" != "N/A" ]; then
[ "$nvmrc_node_version" != "$node_version" ] && nvm use
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use an if here instead of &&, or else it'll run afoul of set -e

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lukechilds lukechilds force-pushed the auto-use branch 2 times, most recently from 337984d to 5f5bdd7 Compare January 5, 2017 06:38
@lukechilds
Copy link
Contributor Author

Yeah, sorry, it is a duplicate as #1357. I missed that.

Although this doesn't have the unnecessary extra if condition.

@lukechilds
Copy link
Contributor Author

Just FYI, auto use implementation is completed in zsh-nvm.

@ljharb ljharb merged commit f1a5f2a into nvm-sh:master Jan 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants