From 59fbc451d9742195edde2a0a9def4f57fff8b4dd Mon Sep 17 00:00:00 2001 From: Ookay <1170488531@qq.com> Date: Thu, 21 May 2026 14:57:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(warp):=20=E5=9C=A8=20Windows=20=E4=B8=8A?= =?UTF-8?q?=E9=80=9A=E8=BF=87=20bash=20=E6=89=A7=E8=A1=8C=20hook=20?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Claude Code native Windows 直接执行 .sh hook 时会触发系统的选择应用打开弹窗。 将 hooks.json 中的脚本命令改为显式 bash 调用,避免 Windows ShellExecute 处理 .sh 文件。 影响范围:plugins/warp/hooks/hooks.json --- plugins/warp/hooks/hooks.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/warp/hooks/hooks.json b/plugins/warp/hooks/hooks.json index b2273b4..27b6e64 100644 --- a/plugins/warp/hooks/hooks.json +++ b/plugins/warp/hooks/hooks.json @@ -7,7 +7,7 @@ "hooks": [ { "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/on-session-start.sh" + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/on-session-start.sh\"" } ] } @@ -17,7 +17,7 @@ "hooks": [ { "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/on-stop.sh" + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/on-stop.sh\"" } ] } @@ -28,7 +28,7 @@ "hooks": [ { "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/on-notification.sh" + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/on-notification.sh\"" } ] } @@ -38,7 +38,7 @@ "hooks": [ { "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/on-permission-request.sh" + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/on-permission-request.sh\"" } ] } @@ -48,7 +48,7 @@ "hooks": [ { "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/on-prompt-submit.sh" + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/on-prompt-submit.sh\"" } ] } @@ -58,7 +58,7 @@ "hooks": [ { "type": "command", - "command": "${CLAUDE_PLUGIN_ROOT}/scripts/on-post-tool-use.sh" + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/on-post-tool-use.sh\"" } ] }