Wrap agent startup hook commands with bash -c (#8189)

Updated sessionStart hook commands to explicitly use bash -c wrapper.
This improves compatibility across different environments where default
shell may vary.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
This commit is contained in:
Charlie Egan
2026-01-07 10:27:35 +00:00
committed by GitHub
parent 0b0c0ee4b4
commit b2043cb45b
+2 -2
View File
@@ -6,11 +6,11 @@
"hooks": [
{
"type": "command",
"command": "if [ -f \"$CLAUDE_PROJECT_DIR/AGENTS.md\" ]; then cat \"$CLAUDE_PROJECT_DIR/AGENTS.md\"; fi"
"command": "bash -c 'if [ -f \"$CLAUDE_PROJECT_DIR/AGENTS.md\" ]; then cat \"$CLAUDE_PROJECT_DIR/AGENTS.md\"; fi'"
},
{
"type": "command",
"command": "if [ -f \"$CLAUDE_PROJECT_DIR/docs/docs/contrib-code.md\" ]; then cat \"$CLAUDE_PROJECT_DIR/docs/docs/contrib-code.md\"; fi"
"command": "bash -c 'if [ -f \"$CLAUDE_PROJECT_DIR/docs/docs/contrib-code.md\" ]; then cat \"$CLAUDE_PROJECT_DIR/docs/docs/contrib-code.md\"; fi'"
}
]
}