Skip to content

Commit 9ff2709

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 e5aaea9 commit 9ff2709

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
@@ -4071,10 +4071,12 @@ nvm() {
40714071
;;
40724072
"ls-remote" | "list-remote")
40734073
local NVM_LTS
4074-
local NVM_MIN
4075-
NVM_MIN="${NVM_MIN-}"
40764074
local PATTERN
40774075
local NVM_NO_COLORS
4076+
local NVM_MIN_ENV
4077+
NVM_MIN_ENV="${NVM_MIN-}"
4078+
local NVM_MIN
4079+
NVM_MIN="${NVM_MIN_ENV-}"
40784080

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

0 commit comments

Comments
 (0)