Skip to content

fix(warp): run hook scripts through bash on Windows#57

Open
0okay wants to merge 1 commit into
warpdotdev:mainfrom
0okay:fix/windows-bash-hook-commands
Open

fix(warp): run hook scripts through bash on Windows#57
0okay wants to merge 1 commit into
warpdotdev:mainfrom
0okay:fix/windows-bash-hook-commands

Conversation

@0okay
Copy link
Copy Markdown

@0okay 0okay commented May 21, 2026

Summary

  • Invoke Warp hook shell scripts through bash in hooks.json
  • Prevent native Windows Claude Code from asking which app should open .sh files when hooks run

Closes #56

Verification

  • Get-Content -Raw plugins\warp\hooks\hooks.json | ConvertFrom-Json | Out-Null
  • git diff --check
  • Simulated on-post-tool-use.sh invocation through Bash exits successfully in local Windows environment

Note: bash plugins/warp/tests/test-hooks.sh currently reports 55 passed / 2 failed on Windows Git Bash because test fixture paths like /Users/alice/my-project and /tmp/transcript.jsonl are auto-converted to C:/Program Files/Git/... and C:/Users/Administrator/AppData/Local/Temp/.... Those failures appear unrelated to this hook command change.

Claude Code native Windows 直接执行 .sh hook 时会触发系统的选择应用打开弹窗。

将 hooks.json 中的脚本命令改为显式 bash 调用,避免 Windows ShellExecute 处理 .sh 文件。

影响范围:plugins/warp/hooks/hooks.json
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.

Windows native Claude Code opens app picker for .sh hook scripts

1 participant