mirror of
https://github.com/obra/superpowers.git
synced 2026-04-16 02:02:41 +00:00
fix: quote CLAUDE_PLUGIN_ROOT for spaces, use POSIX-safe path resolution
- Quote ${CLAUDE_PLUGIN_ROOT} in hooks.json to handle paths with spaces
(e.g. "C:\Users\Robert Zimmermann\...")
- Replace bash-only ${BASH_SOURCE[0]:-$0} with POSIX-safe $0 in
run-hook.cmd so the Unix path doesn't break on dash (/bin/sh)
Addresses: #518 (spaces in path), Ubuntu/Debian compatibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd session-start",
|
||||
"command": "'${CLAUDE_PLUGIN_ROOT}/hooks/run-hook.cmd' session-start",
|
||||
"async": false
|
||||
}
|
||||
]
|
||||
|
||||
@@ -40,7 +40,7 @@ exit /b 0
|
||||
CMDBLOCK
|
||||
|
||||
# Unix: run the named script directly
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)"
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
SCRIPT_NAME="$1"
|
||||
shift
|
||||
exec bash "${SCRIPT_DIR}/${SCRIPT_NAME}" "$@"
|
||||
|
||||
Reference in New Issue
Block a user