Skip to content

#2705: fix obsidian detection on Windows - #2707

Open
Ali-Shariati-Najafabadi wants to merge 6 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/2705-obsidian-not-working-as-proxy-commandlet
Open

Ali-Shariati-Najafabadi wants to merge 6 commits into
devonfw:mainfrom
Ali-Shariati-Najafabadi:feature/2705-obsidian-not-working-as-proxy-commandlet

Conversation

@Ali-Shariati-Najafabadi

@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

This PR fixes #2705

ide obsidian reinstalled Obsidian on every call and ide get-version obsidian reported the version of Notepad++. The registry lookup for the uninstall key took the first match of reg query /s /f, which also matches unrelated values, and Obsidian is not in the PATH so the existing installation was never found.

Implemented changes:

  • WindowsHelperImpl.findUninstallKey only accepts a key whose DisplayName contains the app name.
  • Obsidian finds its installation directory via the Windows registry (same approach as PgAdmin), so an installed Obsidian is detected and launched instead of reinstalled.
  • Added tests to WindowsHelperImplTest and ObsidianTest, and the CHANGELOG entry.

Testing instructions

  1. On Windows run ide obsidian and finish the installer.
  2. Run ide -d get-version obsidian and verify that the installed version is the Obsidian version and not the one of another tool.
  3. Run ide obsidian again and verify that no installer is started and Obsidian is launched.
  4. Run mvn -Dtest=ObsidianTest,WindowsHelperImplTest test in the cli folder.

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 and not feature/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 labelled
    with internal
  • You have not changed any dependency in pom.xml files or otherwise if runtime dependencies changed,
    you have updated our LICENSE.adoc
  • You have formulated clear instructions on how to test your contribution under "Testing instructions"

@coveralls

coveralls commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 41042776190

Coverage increased (+0.04%) to 75.324%

Details

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

Uncovered Changes

No uncovered changes found.

Coverage Regressions

44 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
com/devonfw/tools/ide/os/WindowsHelperImpl.java 42 53.85%
com/devonfw/tools/ide/tool/obsidian/Obsidian.java 2 77.42%

Coverage Stats

Coverage Status
Relevant Lines: 19925
Covered Lines: 15661
Line Coverage: 78.6%
Relevant Branches: 8868
Covered Branches: 6027
Branch Coverage: 67.96%
Branches in Coverage %: Yes
Coverage Strength: 3.38 hits per line

💛 - Coveralls

@Ali-Shariati-Najafabadi Ali-Shariati-Najafabadi moved this from 🆕 New to Team Review in IDEasy board Oct 20, 2026

@hohwille hohwille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Ali-Shariati-Najafabadi thanks for your PR. Your fix looks plausible to me and explains the strange effect that Nodepad++ was getting uninstalled instead of Obsidian. 👍

I leave this in team-review so a team-reviewer can especially test your fix manually before we merge but from my quick review look this seems fully correct and great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Obsidian not working as proxy commandlet

4 participants