Skip to content

Conversation

@hohwille
Copy link
Member

@hohwille hohwille commented Jan 20, 2026

This PR fixes #1679

Implemented changes:

  • do not fail if npm list gives exit code 1 (for tool not installed) since this seems normal in npm.
  • added method ProcessContext.withExitCodeAcceptor
  • use that method in NpmBasedCommandlet
  • added method ProcessContext.createChild()
  • use that method for ToolInstallRequest so we do not disable default exit code handling for parent tool installations
  • extended test

Labeled as internal since the ticket was already added to CHANGELOG by PR #1680


Checklist for this PR

Make sure everything is checked before merging this PR. For further info please also see
our DoD.

  • When running mvn clean test locally all tests pass and build is successful
  • PR title is of the form #«issue-id»: «brief summary» (e.g. #921: fixed setup.bat). If no issue ID exists, title only.
  • PR top-level comment summarizes what has been done and contains link to addressed issue(s)
  • PR and issue(s) have suitable labels
  • Issue is set to In Progress and assigned to you or there is no issue (might happen for very small PRs)
  • You followed all coding conventions
  • You have added the issue implemented by your PR in CHANGELOG.adoc unless issue is labeled
    with internal

@hohwille hohwille added this to the release:2026.01.001 milestone Jan 20, 2026
@hohwille hohwille self-assigned this Jan 20, 2026
@hohwille hohwille added npm node package manager ng Angular CLI yarn package manager alternative to npm bugfix PR that fixes a bug issue process executing external programs (ProcessContext) labels Jan 20, 2026
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Jan 20, 2026
@hohwille hohwille added the internal Nothing to be added to CHANGELOG, only internal story label Jan 20, 2026
@coveralls
Copy link
Collaborator

Pull Request Test Coverage Report for Build 21174240071

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 68 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.02%) to 70.447%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/process/ProcessResult.java 2 0.0%
com/devonfw/tools/ide/tool/PackageManagerBasedLocalToolCommandlet.java 2 90.0%
com/devonfw/tools/ide/tool/npm/NpmBasedCommandlet.java 3 83.78%
com/devonfw/tools/ide/process/ProcessContext.java 10 56.41%
com/devonfw/tools/ide/process/ProcessResultImpl.java 23 51.09%
com/devonfw/tools/ide/process/ProcessContextImpl.java 28 80.71%
Totals Coverage Status
Change from base Build 21171102070: -0.02%
Covered Lines: 10479
Relevant Lines: 14289

💛 - Coveralls

@hohwille hohwille merged commit f198cff into devonfw:main Jan 20, 2026
4 checks passed
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in IDEasy board Jan 20, 2026
@hohwille hohwille deleted the feature/1679-fix-npm-list-exit-code branch January 20, 2026 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR that fixes a bug issue internal Nothing to be added to CHANGELOG, only internal story ng Angular CLI npm node package manager process executing external programs (ProcessContext) yarn package manager alternative to npm

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Npm based commandlets fail to determine installed version of npm tool

2 participants