claude-code: read where it runs from the controller's JSON answer
nodesRunningMe looked for printed lines in what is a JSON list, so every register tool's "also on" hint and every nodes: "all" named no machine.
This commit is contained in:
@@ -94,7 +94,7 @@ func TestEachKindLandsInItsOnePlace(t *testing.T) {
|
||||
} `json:"hooks"`
|
||||
}
|
||||
_ = json.Unmarshal([]byte(plugin[root+"hooks/hooks.json"].Content), &hooks)
|
||||
// The mesh's own guard on the shell first (novox/hq ADR 0244), then the hook registered.
|
||||
// The mesh's own guard on the shell first (novox/hq ADR 0245), then the hook registered.
|
||||
if pre := hooks.Hooks["PreToolUse"]; len(pre) != 2 || pre[0].Matcher != GuardMatcher || pre[0].Hooks[0].Command != GuardCommand() ||
|
||||
pre[1].Matcher != "Bash" || pre[1].Hooks[0].Command != `"${CLAUDE_PLUGIN_ROOT}/hooks/guard"/guard.sh` {
|
||||
t.Errorf("the hook's command does not name its directory, quoted: %s", plugin[root+"hooks/hooks.json"].Content)
|
||||
|
||||
Reference in New Issue
Block a user