Skip to content

Commit a85fee1

Browse files
committed
do not skip installed versions
1 parent 28444c5 commit a85fee1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

nvm.sh

+8-2
Original file line numberDiff line numberDiff line change
@@ -1760,9 +1760,7 @@ BEGIN {
17601760
split(lines[n], fields, "[[:blank:]]+");
17611761
cols = alen(fields);
17621762
version = fields[1];
1763-
if (filter && comp(version, min_ver) < 0) continue;
17641763
1765-
filter = 0;
17661764
is_installed = 0;
17671765
for (i in installed) {
17681766
if (version == installed[i]) {
@@ -1771,6 +1769,14 @@ BEGIN {
17711769
}
17721770
}
17731771
1772+
if (filter && !is_installed) {
1773+
if (comp(version, min_ver) >= 0) {
1774+
filter = 0;
1775+
} else {
1776+
continue;
1777+
}
1778+
}
1779+
17741780
fmt_version = "%15s";
17751781
if (version == current) {
17761782
fmt_version = fmt_current;

0 commit comments

Comments
 (0)