-
-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix zsh node version autochange not installing node version #1357
Conversation
@PeterDaveHello (from #1306) - can you confirm that this is the correct fix? |
@@ -322,7 +322,7 @@ 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" ] && [ "$nvmrc_node_version" != "$node_version" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use a single =
here
I'll test it 👍 |
I think putting |
yep that makes more sense |
so is this good? |
@@ -322,8 +322,10 @@ 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" ] && [ "$nvmrc_node_version" != "$node_version" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the logic on this line says "if the nvmrc version is N/A and the node_version is not N/A", but nvm version
doesn't print out N/A
ever - so the second condition will always be true.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep your right changed
No description provided.