Problem
The aws-serverless plugin's PostToolUse hook command references ${CLAUDE_PLUGIN_ROOT} without quoting and without an explicit shell interpreter. When CLAUDE_CONFIG_DIR (and therefore CLAUDE_PLUGIN_ROOT) contains a space — e.g. /Users/me/Work/Company Name/.claude — the shell word-splits the path and the hook fails on every Edit/Write with:
PostToolUse:Edit hook error
Failed with non-blocking status code: /bin/sh: /Users/me/Work/Company: is a directory
Affected file
plugins/aws-serverless/hooks/hooks.json
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate-template.sh",
The path is passed directly to /bin/sh -c with no quotes and no bash prefix. When the expanded path contains a space, /bin/sh interprets the first word as the command name.
Fix
Add bash and wrap the path in escaped double quotes:
"command": "bash \"${CLAUDE_PLUGIN_ROOT}/scripts/validate-template.sh\"",
This matches the pattern used by other plugins (e.g. superpowers in anthropics/claude-plugins-official).
Problem
The
aws-serverlessplugin's PostToolUse hook command references${CLAUDE_PLUGIN_ROOT}without quoting and without an explicit shell interpreter. WhenCLAUDE_CONFIG_DIR(and thereforeCLAUDE_PLUGIN_ROOT) contains a space — e.g./Users/me/Work/Company Name/.claude— the shell word-splits the path and the hook fails on every Edit/Write with:Affected file
plugins/aws-serverless/hooks/hooks.jsonThe path is passed directly to
/bin/sh -cwith no quotes and nobashprefix. When the expanded path contains a space,/bin/shinterprets the first word as the command name.Fix
Add
bashand wrap the path in escaped double quotes:This matches the pattern used by other plugins (e.g.
superpowersinanthropics/claude-plugins-official).