From d5d66c34d989c569a8e3242f5e692d0b77be28a3 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 15 Sep 2014 07:54:30 -0700 Subject: [PATCH] If there's no "default" specified, fall back to an .nvmrc file. --- nvm.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index b657af9..c076373 100644 --- a/nvm.sh +++ b/nvm.sh @@ -842,5 +842,9 @@ nvm() { esac } -nvm ls default >/dev/null && nvm use default >/dev/null || true +if nvm ls default >/dev/null; then + nvm use default >/dev/null +elif nvm_rc_version >/dev/null 2>&1; then + nvm use >/dev/null +fi