Skip to content

Commit

Permalink
ls-remote: introduce temp var for env inheritance
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ryenus and ljharb committed Jul 15, 2024
1 parent 547f50a commit dffecf8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4013,10 +4013,12 @@ nvm() {
;;
"ls-remote" | "list-remote")
local NVM_LTS
local NVM_MIN
NVM_MIN="${NVM_MIN-}"
local PATTERN
local NVM_NO_COLORS
local NVM_MIN_ENV
NVM_MIN_ENV="${NVM_MIN-}"
local NVM_MIN
NVM_MIN="${NVM_MIN_ENV-}"

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

0 comments on commit dffecf8

Please sign in to comment.