4 Commits

Author SHA1 Message Date
Mateusz Tymek
7a8997d583 v0.1.0 2026-02-04 21:31:18 +01:00
Mateusz Tymek
d532a2a490 conditionally set detached to true on non-windows platforms so that OC process can be correctly terminated 2026-02-04 21:16:41 +01:00
Gerkinfeltser
23832461a7 Add Windows troubleshooting section for PATH issues
Documents the workaround for Windows users who encounter
"Executable not found at 'opencode'" error due to Electron
not fully inheriting PATH environment variable.
2026-02-04 21:02:46 +01:00
Gerkinfeltser
4baf27837e Fix Windows spawn compatibility for .cmd files
- Add shell: true to spawn options for .cmd file execution on Windows
- Add windowsHide: true to prevent console window from appearing
- Remove detached: true which conflicts with shell: true on Windows

Fixes spawn EINVAL error on Windows when launching opencode.cmd
2026-02-04 21:02:46 +01:00
4 changed files with 21 additions and 3 deletions

View File

@@ -69,3 +69,19 @@ Currently, this is work-in-progress feature with some limitations:
<img src="./assets/plugin_settings.png" alt="Available plugin settings" />
## Windows Troubleshooting
If you see "Executable not found at 'opencode'" despite opencode being installed:
1. Find your opencode.cmd path:
```
where opencode.cmd
```
2. Configure the full path in plugin settings:
```
C:\Users\{username}\AppData\Roaming\npm\opencode.cmd
```
This is due to Electron/Obsidian not fully inheriting PATH on Windows.

View File

@@ -1,7 +1,7 @@
{
"id": "opencode-obsidian",
"name": "OpenCode-Obsidian",
"version": "0.0.0",
"version": "0.1.0",
"minAppVersion": "1.4.0",
"description": "Embed OpenCode AI assistant in Obsidian for AI-powered note management",
"author": "mtymek",

View File

@@ -1,6 +1,6 @@
{
"name": "obsidian-opencode",
"version": "0.0.0",
"version": "0.1.0",
"description": "Embed OpenCode AI assistant in Obsidian",
"main": "main.js",
"scripts": {

View File

@@ -85,7 +85,9 @@ export class ProcessManager {
cwd: this.projectDirectory,
env: { ...process.env, NODE_USE_SYSTEM_CA: "1" },
stdio: ["ignore", "pipe", "pipe"],
detached: true,
shell: true,
windowsHide: true,
detached: (process.platform !== "win32"),
}
);