fix(hub-guide): add nested hooks array in hooks.json entries
Each event entry needs hooks: [{ type, command, timeout }] inside it.
This commit is contained in:
+10
-6
@@ -1,15 +1,19 @@
|
|||||||
{
|
{
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"SessionStart": [{
|
"SessionStart": [{
|
||||||
"type": "command",
|
"hooks": [{
|
||||||
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-project.sh\"",
|
"type": "command",
|
||||||
"timeout": 10
|
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-project.sh\"",
|
||||||
|
"timeout": 10
|
||||||
|
}]
|
||||||
}],
|
}],
|
||||||
"PreToolUse": [{
|
"PreToolUse": [{
|
||||||
"matcher": "Write|Edit",
|
"matcher": "Write|Edit",
|
||||||
"type": "command",
|
"hooks": [{
|
||||||
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-file-type.sh\" \"$TOOL_INPUT\"",
|
"type": "command",
|
||||||
"timeout": 10
|
"command": "bash \"$CLAUDE_PLUGIN_ROOT/hooks/scripts/detect-file-type.sh\" \"$TOOL_INPUT\"",
|
||||||
|
"timeout": 10
|
||||||
|
}]
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user