Skip to content

fix(first-mate): exec .cmd/.bat via shell on Windows - #6

Merged
mogul merged 1 commit into
mainfrom
fix/windows-cmd-subprocess
Nov 3, 2026
Merged

mogul merged 1 commit into
mainfrom
fix/windows-cmd-subprocess

Conversation

@mogul

@mogul mogul commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Summary

Fix first-mate-check.py on Windows: the run() helper calls subprocess.run([...]) without a shell, and Windows cannot exec a .cmd/.bat directly — so the paseo CLI (which is a .cmd shim on Windows) fails with WinError 2: The system cannot find the file specified, breaking the agents and permission prompts watchers.

Before / After

run() now resolves the executable with shutil.which() and, when it is a .cmd/.bat on Windows, routes the command through cmd.exe via subprocess.list2cmdline (safe quoting) with shell=True. Other commands (e.g. gh, which is an .exe) are unchanged.

Verification

  • paseo --version → 0.14.0 (shim repaired separately on the host).
  • first-mate-check.py now reports NEW agents: ... and NEW permission prompts: none instead of ERROR ... [WinError 2].

AI-assisted.

@mogul
mogul merged commit 100f2db into main Nov 3, 2026
10 checks 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.

1 participant