fix: quote CLAUDE_PLUGIN_ROOT in hooks.json for paths with spaces

On Windows, usernames with spaces (e.g. /c/Users/Lewis Dong/) cause
bash to split the path. All 7 hook commands now use escaped quotes
around the variable expansion.

Fixes #148
This commit is contained in:
xsser
2026-04-23 00:02:35 +08:00
parent 991fdb9123
commit 2b92d17093
+7 -7
View File
@@ -7,7 +7,7 @@
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/frustration-trigger.sh",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/frustration-trigger.sh\"",
"timeout": 5
}
]
@@ -19,7 +19,7 @@
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/failure-detector.sh",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/failure-detector.sh\"",
"timeout": 5
}
]
@@ -42,7 +42,7 @@
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/session-restore.sh",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-restore.sh\"",
"timeout": 5
}
]
@@ -52,7 +52,7 @@
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/session-restore.sh",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/session-restore.sh\"",
"timeout": 5
}
]
@@ -64,11 +64,11 @@
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/pua-loop-hook.sh"
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/pua-loop-hook.sh\""
},
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/stop-feedback.sh",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/stop-feedback.sh\"",
"timeout": 10
}
]
@@ -80,7 +80,7 @@
"hooks": [
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/subagent-teardown.sh",
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/subagent-teardown.sh\"",
"timeout": 5
}
]