Skip to content

Commit 73fa023

Browse files
devySinghhohwille
andauthored
#1646 Implemented check for duplicate versions (#1662)
Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
1 parent 46deea0 commit 73fa023

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Release with new features and bugfixes:
99
* https://github.com/devonfw/IDEasy/issues/1166[#1166]: Automatic project import for IntelliJ
1010
* https://github.com/devonfw/IDEasy/issues/1508[#1508]: xml merger fails when merging empty file
1111
* https://github.com/devonfw/IDEasy/issues/1660[#1660]: ide status still failing
12+
* https://github.com/devonfw/IDEasy/issues/1646[#1646]: Duplicated options from CVE update suggestion
1213
* https://github.com/devonfw/IDEasy/issues/39[#39]: Implement ToolCommandlet for pip
1314
* https://github.com/devonfw/IDEasy/issues/1633[#1633]: CVE suggestions show unstable versions
1415
* https://github.com/devonfw/IDEasy/issues/1636[#1636]: CVE suggestion scoring more reasonable

cli/src/main/java/com/devonfw/tools/ide/tool/ToolCommandlet.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import java.nio.file.Path;
66
import java.util.ArrayList;
77
import java.util.List;
8+
import java.util.Objects;
89
import java.util.Set;
910

1011
import com.devonfw.tools.ide.commandlet.Commandlet;
@@ -594,6 +595,11 @@ protected VersionIdentifier cveCheck(ToolInstallRequest request) {
594595
ToolVulnerabilities nearestVulnerabilities = currentVulnerabilities;
595596
List<VersionIdentifier> toolVersions = getVersions();
596597
for (VersionIdentifier version : toolVersions) {
598+
599+
if (Objects.equals(version, resolvedVersion)) {
600+
continue; // Skip the entire iteration for resolvedVersion
601+
}
602+
597603
if (acceptVersion(version, allowedVersions, requireStableVersion)) {
598604
ToolVulnerabilities newVulnerabilities = toolSecurity.findCves(version, this.context, minSeverity);
599605
if (newVulnerabilities.isSafer(latestVulnerabilities)) {

documentation/cli.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Therefore we decided not to integrate tools like databases, IAM tools like keycl
107107
Instead each project can create its own `docker compose` configuration to manage the required services.
108108

109109
Also, we do not provide `git` as a local tool but consider it as a pre-requisite.
110-
For global tools the principle is typically "latest is greates".
110+
For global tools the principle is typically "latest is greatest".
111111

112112
== Auto-completion
113113

0 commit comments

Comments
 (0)