Skip to content

Discover official Windows Obsidian installs - #55

Merged
vrtmrz merged 2 commits into
vrtmrz:mainfrom
kimjansheden:fix/windows-obsidian-discovery
Oct 4, 2026
Merged

vrtmrz merged 2 commits into
vrtmrz:mainfrom
kimjansheden:fix/windows-obsidian-discovery

Conversation

@kimjansheden

Copy link
Copy Markdown
Contributor

Summary

  • Discover official per-user and all-user Windows Obsidian installations before searching PATH.
  • Resolve the Obsidian.com terminal redirector and the legacy obsidian-cli.exe name.
  • Make temporary Vault containment assertions platform-aware.
  • Document the Windows discovery order and platform coverage.

Compatibility

  • OBSIDIAN_BINARY and OBSIDIAN_CLI overrides retain priority.
  • Linux, macOS, and managed Linux discovery retain their existing behaviour.
  • Windows checks standard installation roots before PATH and removes duplicate standard roots.

Verification

  • npx -y npm@11.18.0 run test --workspace @vrtmrz/obsidian-test-session -- --reporter=dot: 81 passed, 7 skipped.
  • npx -y npm@11.18.0 run verify:workspace: passed all type, lint, unit, build, pack, and installed-consumer checks, including 983 octagonal-wheels tests.
  • Windows 11 Pro with a per-user Obsidian 1.13.7 installation and no executable overrides:
    • test:e2e:obsidian:session-lifecycle passed.
    • test:e2e:obsidian:smoke passed.
    • All three in-repository runtime consumers resolved the standard application and CLI paths. Falsifying fixtures then supplied a synthetic application executable with no CLI in the standard roots or PATH; each consumer rejected the missing CLI and reported every inspected candidate.
    • profile-restart.ts reached its post-restart assertion after successful discovery and two isolated launches; its local-storage persistence assertion observed null.
  • test:e2e:obsidian:validated selected the reviewed 1.13.6 target, then its Windows nested-command launcher returned spawn EINVAL before starting an Obsidian session.

kimjansheden and others added 2 commits October 3, 2026 16:22
(packages/obsidian-test-session/src/environment.ts)
- Search the official per-user and all-user installation roots before PATH on Windows.
- Recognise Obsidian.com and the legacy obsidian-cli.exe terminal entry point.

(packages/obsidian-test-session/src/environment.test.ts)
- Cover per-user discovery without PATH and exact fallback ordering for both CLI names.

(packages/obsidian-test-session/src/vault.test.ts)
- Check temporary Vault containment with platform-aware relative paths.

(packages/obsidian-test-session/README.md, packages/obsidian-test-session/updates.md)
- Document the Windows lookup contract and platform coverage.
@vrtmrz

vrtmrz commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Thank you so much for this PR and for testing it on Windows! This is a very helpful improvement.

I would also like to add a small follow-up with regression tests to cover native all-user installs when using 32-bit Node on 64-bit Windows. I think covering this case now will make future maintenance easier.

@vrtmrz
vrtmrz merged commit c35ae82 into vrtmrz:main Oct 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants