Skip to content

Commit

Permalink
do not skip installed versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ryenus committed Jan 29, 2024
1 parent 28444c5 commit a85fee1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1760,9 +1760,7 @@ BEGIN {
split(lines[n], fields, "[[:blank:]]+");
cols = alen(fields);
version = fields[1];
if (filter && comp(version, min_ver) < 0) continue;
filter = 0;
is_installed = 0;
for (i in installed) {
if (version == installed[i]) {
Expand All @@ -1771,6 +1769,14 @@ BEGIN {
}
}
if (filter && !is_installed) {
if (comp(version, min_ver) >= 0) {
filter = 0;
} else {
continue;
}
}
fmt_version = "%15s";
if (version == current) {
fmt_version = fmt_current;
Expand Down

0 comments on commit a85fee1

Please sign in to comment.