Skip to content

Conversation

@theFong
Copy link
Member

@theFong theFong commented Jan 29, 2026

In WSL, Windows .exe files cannot be executed directly - they need to go through cmd.exe. This fixes the "Exec format error" when running brev open cursor or similar commands in WSL.

Changes:

  • Add isWSL() helper to detect Windows Subsystem for Linux
  • Add wslPathToWindows() to convert /mnt/c/... paths to C:...
  • Add runWindowsExeInWSL() to run Windows executables via cmd.exe
  • Update runVsCodeCommand, runCursorCommand, runWindsurfCommand to detect WSL and use cmd.exe for Windows executables

This allows users in WSL to seamlessly open VS Code, Cursor, and Windsurf installed on the Windows side.

In WSL, Windows .exe files cannot be executed directly - they need to
go through cmd.exe. This fixes the "Exec format error" when running
`brev open cursor` or similar commands in WSL.

Changes:
- Add isWSL() helper to detect Windows Subsystem for Linux
- Add wslPathToWindows() to convert /mnt/c/... paths to C:\...
- Add runWindowsExeInWSL() to run Windows executables via cmd.exe
- Update runVsCodeCommand, runCursorCommand, runWindsurfCommand to
  detect WSL and use cmd.exe for Windows executables

This allows users in WSL to seamlessly open VS Code, Cursor, and
Windsurf installed on the Windows side.
@theFong theFong requested a review from a team as a code owner January 29, 2026 00:00
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