show a warning about skipped versions if any

due the use of --min or NVM_MIN, which would show only the versions
higher than the specified min version, and/or the available minor/patch
updates for the installed versions.
This commit is contained in:
ryenus 2024-10-21 09:35:50 +08:00
parent cd30a37384
commit d655614c69

5
nvm.sh
View File

@ -1925,6 +1925,11 @@ BEGIN {
output[m++] = formatted;
}
skipped = rows - m + 1
if (skipped > 0) {
printf("[WARN] %d version(s) skipped.\n", skipped) > "/dev/stderr"
}
for (n = 1; n < m; n++) {
print output[n]
}