Skip to content

fix: invoke zeroshot via node on Windows#473

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

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

Conversation

@haosenwang1018

Copy link
Copy Markdown

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

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