Skip to content

Commit b4ba55b

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 301cfa1 commit b4ba55b

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
@@ -4135,10 +4135,12 @@ nvm() {
41354135
;;
41364136
"ls-remote" | "list-remote")
41374137
local NVM_LTS
4138-
local NVM_MIN
4139-
NVM_MIN="${NVM_MIN-}"
41404138
local PATTERN
41414139
local NVM_NO_COLORS
4140+
local NVM_MIN_ENV
4141+
NVM_MIN_ENV="${NVM_MIN-}"
4142+
local NVM_MIN
4143+
NVM_MIN="${NVM_MIN_ENV-}"
41424144

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

0 commit comments

Comments
 (0)