Skip to content

Commit 1f3af43

Browse files
ryenusljharb
andcommitted
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 <ljharb@gmail.com>
1 parent 686d33b commit 1f3af43

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nvm.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4108,10 +4108,12 @@ nvm() {
41084108
;;
41094109
"ls-remote" | "list-remote")
41104110
local NVM_LTS
4111-
local NVM_MIN
4112-
NVM_MIN="${NVM_MIN-}"
41134111
local PATTERN
41144112
local NVM_NO_COLORS
4113+
local NVM_MIN_ENV
4114+
NVM_MIN_ENV="${NVM_MIN-}"
4115+
local NVM_MIN
4116+
NVM_MIN="${NVM_MIN_ENV-}"
41154117

41164118
while [ $# -gt 0 ]; do
41174119
case "${1-}" in

0 commit comments

Comments
 (0)