Skip to content
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/1719[#1719]: Add Rust and MSVC support
* https://github.com/devonfw/IDEasy/issues/1991[#1991]: Improve WindowsHelperMock
* https://github.com/devonfw/IDEasy/issues/1457[#1457]: Improve CLI error messages on invalid args or commandlets not available in current context
* https://github.com/devonfw/IDEasy/issues/1965[#1965]: Improve dependent installations for npm and pip based commandlets

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private VersionIdentifier runPackageManagerGetInstalledVersion(String npmPackage
ProcessContext pc = this.context.newProcess().errorHandling(ProcessErrorHandling.THROW_CLI)
.withExitCodeAcceptor(rc -> true); // if the tool is not installed npm list will end with exit code 1
request.setProcessContext(pc);
ProcessResult result = runPackageManager(request);
ProcessResult result = runPackageManager(request, true);
if (result.isSuccessful()) {
List<String> versions = result.getOut();
String parsedVersion = null;
Expand All @@ -84,4 +84,10 @@ private VersionIdentifier runPackageManagerGetInstalledVersion(String npmPackage
return null;
}

@Override
protected boolean isSkipInstallation() {
Npm npm = this.context.getCommandletManager().getCommandlet(Npm.class);
return npm.isInstalled();
}

}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular reason why Pip doesn't override isSkipInstallation() in the same way that Npm does?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because i didn't found a loop dependency that can occurs in pip context.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regarding tests i will add some junit tests in NgTest and NestTest

Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ protected VersionIdentifier computeInstalledVersion() {
}
PackageManagerRequest request = new PackageManagerRequest("show", getPackageName()).setProcessMode(ProcessMode.DEFAULT_CAPTURE)
.setProcessContext(this.context.newProcess().errorHandling(ProcessErrorHandling.NONE));
ProcessResult processResult = runPackageManager(request);
ProcessResult processResult = runPackageManager(request, true);
if (processResult.isSuccessful()) {
for (String line : processResult.getOut()) {
// we are looking for something like "Version: 25.3"
Expand Down
Loading