Skip to content

#2102 set ideRoot during msi installation correctly#2149

Draft
quando632 wants to merge 9 commits into
devonfw:mainfrom
quando632:feature/2102-missing-ide-root
Draft

#2102 set ideRoot during msi installation correctly#2149
quando632 wants to merge 9 commits into
devonfw:mainfrom
quando632:feature/2102-missing-ide-root

Conversation

@quando632

@quando632 quando632 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

This PR fixes #2102

Implemented changes:

  • AbstractIdeContext: ideRoot is no longer final; added setIdeRoot(Path) so the context can
    reflect the derived install target.
  • IdeContext: added setIdeRoot(Path) to the interface.
  • IdeasyCommandlet.installIdeasy(...): after deriving the target via determineIdeRoot(cwd), it
    now calls context.setIdeRoot(...), keeping the whole install run consistent.
  • AbstractIdeTestContext: removed the now-redundant ideRoot/ideRootSet fields and
    getIdeRoot/setIdeRoot overrides — the test context inherits the production setter, aligning
    test and production behaviour.
  • Added test IdeasyCommandletTest#testInstallIdeasyUpdatesIdeRoot (windows/mac/linux) that fails
    without the fix and passes with it.

Verified the invariants called out in the issue are unaffected: the isIdeRootRequired gate in
applyAndRun, and the temp-download-path creation guarded by ideRoot != null in the constructor.


Testing instructions

  1. Automated: in cli/, run mvn -Dtest=IdeasyCommandletTest test — all cases pass, including
    the new testInstallIdeasyUpdatesIdeRoot. (Reverting the context.setIdeRoot(...) line makes the
    3 new cases fail, confirming the test reproduces the bug.)
  2. Manual (fresh setup, e.g. Windows Sandbox where IDE_ROOT is not set): run the IDEasy MSI
    installer, then open the install log at IDE_ROOT\_ide\tmp\ideasy\ideasy\install.log. Confirm the
    Windows Terminal Git Bash configuration succeeds and there is no
    Failed to configure Git Bash in Windows Terminal: null message.

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
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@coveralls

coveralls commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 29099695688

Coverage increased (+0.06%) to 72.287%

Details

  • Coverage increased (+0.06%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 183 coverage regressions across 4 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

183 previously-covered lines in 4 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/context/AbstractIdeContext.java 118 70.32%
com/devonfw/tools/ide/tool/IdeasyCommandlet.java 51 74.76%
com/devonfw/tools/ide/context/IdeContext.java 13 77.78%
com/devonfw/tools/ide/version/VersionSegment.java 1 91.08%

Coverage Stats

Coverage Status
Relevant Lines: 16711
Covered Lines: 12585
Line Coverage: 75.31%
Relevant Branches: 7458
Covered Branches: 4886
Branch Coverage: 65.51%
Branches in Coverage %: Yes
Coverage Strength: 3.19 hits per line

💛 - Coveralls

@quando632 quando632 moved this from 🆕 New to 🏗 In progress in IDEasy board Jul 10, 2026
@quando632 quando632 changed the title #2102 delete final of ideRoot #2102 set ideRoot during msi installation correctly Jul 10, 2026
@quando632 quando632 added install installation process of IDE + tools and install commandlet bugfix PR that fixes a bug issue labels Jul 10, 2026
@quando632 quando632 moved this from 🏗 In progress to Team Review in IDEasy board Jul 10, 2026
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 install installation process of IDE + tools and install commandlet

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

IDE_ROOT environment variable is not available to ideasy.exe during MSI installation

2 participants