From 5b0308b9e4a7cd24d4d980b7ea2d68e495cd96a7 Mon Sep 17 00:00:00 2001 From: Michael Turner Date: Thu, 30 Apr 2026 13:23:55 -0500 Subject: [PATCH] Fix path-quoting in SessionStart check-config hook (handles spaces in CLAUDE_PLUGIN_ROOT) If CLAUDE_PLUGIN_ROOT ever expands to a path containing whitespace (e.g. ~/Library/Application Support/...), the unquoted ${CLAUDE_PLUGIN_ROOT} in hooks/hooks.json word-splits and bash receives the path as multiple arguments, failing with "No such file or directory" on the first split. Quoting the expansion makes the invocation correct regardless of the characters in the resolved path. Verified manually: unquoted + space -> bash: /tmp/with: No such file or directory quoted + space -> bash: /tmp/with spaces/.../check-config.sh: No such file quoted + real -> /last30days: Ready - 7 sources active. Co-Authored-By: Claude Opus 4.7 (1M context) --- hooks/hooks.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/hooks.json b/hooks/hooks.json index cc1220e..7c8a389 100644 --- a/hooks/hooks.json +++ b/hooks/hooks.json @@ -6,7 +6,7 @@ "hooks": [ { "type": "command", - "command": "bash ${CLAUDE_PLUGIN_ROOT}/hooks/scripts/check-config.sh", + "command": "bash \"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/check-config.sh\"", "timeout": 5 } ]