[readme] Balance the if statement in bash example
Nesting the `elif` at the same level as the `if` and `fi` makes it clear which code applies to which branch (no .nvmrc file / found .nvmrc file). I wasted a while looking at it trying to work out how it did anything if there was a .nvmrc file, because obviously the `if` didn't match and I couldn't see the `elif` branch.
parent
e9b26938b9
commit
30486b9bd9
|
@ -572,7 +572,7 @@ cdnvm() {
|
||||||
nvm use default;
|
nvm use default;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ -s $nvm_path/.nvmrc && -r $nvm_path/.nvmrc ]]; then
|
elif [[ -s $nvm_path/.nvmrc && -r $nvm_path/.nvmrc ]]; then
|
||||||
declare nvm_version
|
declare nvm_version
|
||||||
nvm_version=$(<"$nvm_path"/.nvmrc)
|
nvm_version=$(<"$nvm_path"/.nvmrc)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue