Skip to content

Commit 4613313

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 <[email protected]>
1 parent e493440 commit 4613313

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
@@ -4109,10 +4109,12 @@ nvm() {
41094109
;;
41104110
"ls-remote" | "list-remote")
41114111
local NVM_LTS
4112-
local NVM_MIN
4113-
NVM_MIN="${NVM_MIN-}"
41144112
local PATTERN
41154113
local NVM_NO_COLORS
4114+
local NVM_MIN_ENV
4115+
NVM_MIN_ENV="${NVM_MIN-}"
4116+
local NVM_MIN
4117+
NVM_MIN="${NVM_MIN_ENV-}"
41164118

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

0 commit comments

Comments
 (0)