From 30486b9bd9b88c875b78f0ea9fd71801be6af46b Mon Sep 17 00:00:00 2001 From: Robert Elliot Date: Mon, 22 Nov 2021 14:34:43 +0000 Subject: [PATCH] [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. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 658b704..4f2b588 100644 --- a/README.md +++ b/README.md @@ -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)