File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " passthru" ,
3- "version" : " 0.2.2 " ,
3+ "version" : " 0.2.3 " ,
44 "description" : " Regex-based permission rules for Claude Code via hooks" ,
55 "owner" : {
66 "name" : " nnemirovsky"
Original file line number Diff line number Diff line change 11{
22 "name" : " passthru" ,
3- "version" : " 0.2.2 " ,
3+ "version" : " 0.2.3 " ,
44 "description" : " Regex-based permission rules for Claude Code via hooks" ,
55 "license" : " MIT"
66}
Original file line number Diff line number Diff line change 2727 ],
2828 "SessionStart" : [
2929 {
30- "matcher" : " startup" ,
3130 "hooks" : [
3231 {
3332 "type" : " command" ,
34- "command" : " ${CLAUDE_PLUGIN_ROOT}/hooks/handlers/session-start.sh" ,
33+ "command" : " bash ${CLAUDE_PLUGIN_ROOT}/hooks/handlers/session-start.sh" ,
3534 "timeout" : 5
3635 }
3736 ]
Original file line number Diff line number Diff line change @@ -137,17 +137,12 @@ setup() {
137137 [ " $output " = " 1" ]
138138}
139139
140- @test " hooks/hooks.json SessionStart matcher is startup" {
141- # Restricts the one-time hint to brand-new sessions. Resume/clear/compact
142- # must not re-fire it.
143- run jq -r ' .hooks.SessionStart[0].matcher' " $REPO_ROOT /hooks/hooks.json"
144- [ " $status " -eq 0 ]
145- [ " $output " = " startup" ]
146- }
147-
148- @test " hooks/hooks.json SessionStart command uses CLAUDE_PLUGIN_ROOT" {
140+ @test " hooks/hooks.json SessionStart command uses bash prefix and CLAUDE_PLUGIN_ROOT" {
141+ # Matches memsearch's known-working pattern: `bash ${CLAUDE_PLUGIN_ROOT}/...`.
142+ # The bash prefix avoids executable-bit / shebang edge cases on some hosts.
149143 run jq -r ' .hooks.SessionStart[0].hooks[0].command' " $REPO_ROOT /hooks/hooks.json"
150144 [ " $status " -eq 0 ]
145+ [[ " $output " == bash\ * ]]
151146 [[ " $output " == * ' ${CLAUDE_PLUGIN_ROOT}' * ]]
152147 [[ " $output " == * ' session-start.sh' ]]
153148}
You can’t perform that action at this time.
0 commit comments