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 <ljharb@gmail.com>
  • Loading branch information
ryenus and ljharb committed Aug 8, 2024
1 parent e5aaea9 commit 9ff2709
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 @@ -4071,10 +4071,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 9ff2709

Please sign in to comment.