[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.
Robert Elliot 2021-11-22 14:34:43 +00:00 committed by Jordan Harband
parent e9b26938b9
commit 30486b9bd9
No known key found for this signature in database
GPG Key ID: 9F6A681E35EF8B56
1 changed files with 1 additions and 1 deletions

View File

@ -572,7 +572,7 @@ cdnvm() {
nvm use default;
fi
elif [[ -s $nvm_path/.nvmrc && -r $nvm_path/.nvmrc ]]; then
elif [[ -s $nvm_path/.nvmrc && -r $nvm_path/.nvmrc ]]; then
declare nvm_version
nvm_version=$(<"$nvm_path"/.nvmrc)