Skip to content

fix: WSL custom command mode + add known issue warning#59

Open
shf-275599 wants to merge 4 commits into
mtymek:mainfrom
shf-275599:main
Open

fix: WSL custom command mode + add known issue warning#59
shf-275599 wants to merge 4 commits into
mtymek:mainfrom
shf-275599:main

Conversation

@shf-275599
Copy link
Copy Markdown

Changes

1. Fix: Custom command mode logic

File: src/server/ServerManager.ts

Problem: The original code only checks useCustomCommand setting without verifying if customCommand is empty. This causes issues in WSL environment where the plugin may incorrectly enter custom command mode even when no custom command is configured.

Fix:

  • Modified the condition to check both useCustomCommand and whether customCommand is empty
  • Ensures custom command mode is only used when a custom command is actually configured

2. Docs: Add known issue warning

File: README.md

Added a prominent warning at the top of README:

  • Warns users about database corruption when running OpenCode in both Obsidian and WSL simultaneously
  • Advises users to avoid running two instances at the same time

Issues Resolved

  • Fixed: OpenCode plugin not working properly when embedded in Obsidian on Windows with WSL
  • Added: Known issue warning to help users avoid common pitfalls

Testing Environment

  • Windows 11 + WSL2
  • Obsidian 1.8.9
  • OpenCode 0.3.28

shf-275599 and others added 4 commits May 1, 2026 23:40
Use a stricter runtime check before entering custom command mode.

ServerManager.start() now derives a local useCustomCommand flag from:
- settings.useCustomCommand
- a non-empty trimmed customCommand

That flag is then used consistently for startup branching, startup mode
logging, and ENOENT error reporting.

This makes startup behavior more predictable when OpenCode is launched
through a wrapper command instead of a direct executable path, including
Windows Obsidian setups that start WSL-hosted OpenCode via wsl.exe.
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.

1 participant