mirror of
https://github.com/obra/superpowers.git
synced 2026-11-06 15:16:30 +00:00
GitHub Copilot on Windows (Copilot CLI and VS Code Copilot) runs a hook's command through PowerShell and ignores shell:"bash". PowerShell parses "<root>/hooks/run-hook.cmd" session-start as a string expression followed by a bareword, fails with "Unexpected token 'session-start'", and the using-superpowers bootstrap never reaches the session. Copilot prefers a hook's powershell key over command when it is present, so add one that runs the same wrapper with the & call operator. Claude Code ignores the key and keeps dispatching command through Git Bash. Verified on Windows 11 in a VM: Copilot CLI 1.0.103 logged the ParserError and sent no bootstrap before the change, and ran the hook and sent the bootstrap after it. Claude Code 2.1.308 ran the hook and sent the bootstrap both before and after. The new test in test-run-hook-cmd-windows.sh runs the hooks.json powershell value through powershell.exe against a plugin root with a space in its path. Co-authored-by: Tugrul Guner <tugrulguner@users.noreply.github.com> Co-authored-by: Serge ARADJ <orty@users.noreply.github.com> Claude-Session: https://claude.ai/code/session_01SHANcr4A71nzuU9et4Fnba |
||
|---|---|---|
| .. | ||
| polyglot-hooks.md | ||