Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Release with new features and bugfixes:
* https://github.com/devonfw/IDEasy/issues/1456[#1456]: Uninstall via Windows settings not working
* https://github.com/devonfw/IDEasy/issues/1688[#1688]: Remove unnecessary message in the CLI when installing a new tool
* https://github.com/devonfw/IDEasy/issues/1685[#1685]: Add Nest CLI to IDEasy commandlets
* https://github.com/devonfw/IDEasy/issues/1886[#1886]: Fix NpmBasedCommandlet shows wrong tool version after install

The full list of changes for this release can be found in https://github.com/devonfw/IDEasy/milestone/44?closed=1[milestone 2026.05.001].

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.devonfw.tools.ide.tool.npm;

import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Set;

Expand Down Expand Up @@ -50,6 +51,17 @@ public ToolRepository getToolRepository() {
return this.context.getNpmRepository();
}

/**
* Override to ignore the toolPath parameter and use npm package manager to detect the actual installed version of the tool.
*
* @param toolPath the installation {@link Path} where to find the version file.
* @return the installed version or null if not installed.
*/
@Override
protected VersionIdentifier getInstalledVersion(Path toolPath) {
return computeInstalledVersion();
}

@Override
protected VersionIdentifier computeInstalledVersion() {
return runPackageManagerGetInstalledVersion(getPackageName());
Expand Down
Loading