[PR #13309] fix: the Desktop “Open In” startup command in Windows/WSL #14613

Open
opened 2026-02-16 18:19:23 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/13309

State: open
Merged: No


What does this PR do?

Fixes #13089
I encountered an error when using the open in Vscode/Zed command with a WSL environment integrated into Windows Desktop. Specifically, the WSL connection was being mistaken for the path.

Fix: On Windows with WSL enabled, openPath first attempts to call applications within the restricted whitelist (code/cursor/zed/sublime-text) via wsl -e. The path is first converted to Linux format, and failure/non-zero exit code logs are added.

If the WSL call is rejected or fails, the original Windows path conversion and the fallback logic of the opener plugin are maintained.

Tauri Command has been introduced to run WSL commands, and command injection risks are reduced through parameter arrays and stricter naming validation.

How did you verify your code works?

I tested the effect after building locally using my fork, and now it can be opened directly.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/13309 **State:** open **Merged:** No --- ### What does this PR do? Fixes #13089 I encountered an error when using the `open in` `Vscode/Zed` command with a WSL environment integrated into Windows Desktop. Specifically, the WSL connection was being mistaken for the path. Fix: On Windows with WSL enabled, `openPath` first attempts to call applications within the restricted whitelist (code/cursor/zed/sublime-text) via `wsl -e`. The path is first converted to Linux format, and failure/non-zero exit code logs are added. If the WSL call is rejected or fails, the original Windows path conversion and the fallback logic of the opener plugin are maintained. Tauri Command has been introduced to run WSL commands, and command injection risks are reduced through parameter arrays and stricter naming validation. ### How did you verify your code works? I tested the effect after building locally using my fork, and now it can be opened directly.
yindo added the pull-request label 2026-02-16 18:19:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#14613