From 03ecd5c33d902b62f7b33ea2a24be726656c03bf Mon Sep 17 00:00:00 2001 From: ryenus Date: Mon, 15 Jul 2024 14:55:33 +0800 Subject: [PATCH] ls-remote: introduce temp var for env inheritance This is to inherit $NVM_MIN from env when defined, meanwhile avoiding inline local variable initialization for ksh compatibility. Co-authored-by: Jordan Harband --- nvm.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nvm.sh b/nvm.sh index ddddc6f..a4f4aed 100755 --- a/nvm.sh +++ b/nvm.sh @@ -4061,10 +4061,12 @@ nvm() { ;; "ls-remote" | "list-remote") local NVM_LTS - local NVM_MIN - NVM_MIN="${NVM_MIN-}" local PATTERN local NVM_NO_COLORS + local NVM_MIN_ENV + NVM_MIN_ENV="${NVM_MIN-}" + local NVM_MIN + NVM_MIN="${NVM_MIN_ENV-}" while [ $# -gt 0 ]; do case "${1-}" in