From 9ff270961de71ac15d1ca874dff56d6ef29ff8c2 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 f7f22e5201..95fc75fec1 100755 --- a/nvm.sh +++ b/nvm.sh @@ -4071,10 +4071,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