Skip to content

Commit 03ecd5c

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 1dce063 commit 03ecd5c

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
@@ -4061,10 +4061,12 @@ nvm() {
40614061
;;
40624062
"ls-remote" | "list-remote")
40634063
local NVM_LTS
4064-
local NVM_MIN
4065-
NVM_MIN="${NVM_MIN-}"
40664064
local PATTERN
40674065
local NVM_NO_COLORS
4066+
local NVM_MIN_ENV
4067+
NVM_MIN_ENV="${NVM_MIN-}"
4068+
local NVM_MIN
4069+
NVM_MIN="${NVM_MIN_ENV-}"
40684070

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

0 commit comments

Comments
 (0)