Skip to content

fix: invoke zeroshot via node on Windows - #473

Open
haosenwang1018 wants to merge 3 commits into
the-open-engine:mainfrom
haosenwang1018:fix/windows-self-invocation
Open

fix: invoke zeroshot via node on Windows#473
haosenwang1018 wants to merge 3 commits into
the-open-engine:mainfrom
haosenwang1018:fix/windows-self-invocation

Conversation

@haosenwang1018

Copy link
Copy Markdown
Contributor

Summary

  • add a small buildZeroshotSpawnSpec() helper for self-invocation
  • on Windows, spawn process.execPath with cli/index.js instead of trying to execute bare zeroshot
  • reuse that helper in both agent-task-executor and claude-task-runner
  • add regression coverage for the Windows vs non-Windows spawn spec

Why

Issue #457 reports that spawn('zeroshot', ...) fails on Windows because npm global commands are exposed as .cmd wrappers, which Node cannot execute the same way as Unix binaries.

This PR fixes the smallest high-impact part first: zeroshot spawning itself. On Windows it now invokes Node directly with the CLI script path, avoiding the .cmd wrapper and the resulting ENOENT failures.

Testing

  • ./node_modules/.bin/mocha tests/providers/detection.test.js

Part of #457

@tomdps

tomdps commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Status review (2026-07-29):

@tomdps tomdps added the bug Something isn't working label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants