Skip to content

Commit dffecf8

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 547f50a commit dffecf8

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
@@ -4013,10 +4013,12 @@ nvm() {
40134013
;;
40144014
"ls-remote" | "list-remote")
40154015
local NVM_LTS
4016-
local NVM_MIN
4017-
NVM_MIN="${NVM_MIN-}"
40184016
local PATTERN
40194017
local NVM_NO_COLORS
4018+
local NVM_MIN_ENV
4019+
NVM_MIN_ENV="${NVM_MIN-}"
4020+
local NVM_MIN
4021+
NVM_MIN="${NVM_MIN_ENV-}"
40204022

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

0 commit comments

Comments
 (0)