claude-code: added 'hooks' and 'hooksDir' options to specify hooks from filesystem

This commit is contained in:
Sewer56 2025-08-22 22:20:10 +01:00 committed by Austin Horstman
parent be37a3492d
commit 5e06d0f184
6 changed files with 88 additions and 1 deletions

View file

@ -32,6 +32,12 @@
test-command = "test content";
};
commandsDir = ./commands;
# assert fail: cannot set hooks and hooksDir at the same time.
hooks = {
test-hook = "test content";
};
hooksDir = ./hooks;
};
test.asserts.assertions.expected = [
@ -39,5 +45,6 @@
"Cannot specify both `programs.claude-code.memory.text` and `programs.claude-code.memory.source`"
"Cannot specify both `programs.claude-code.agents` and `programs.claude-code.agentsDir`"
"Cannot specify both `programs.claude-code.commands` and `programs.claude-code.commandsDir`"
"Cannot specify both `programs.claude-code.hooks` and `programs.claude-code.hooksDir`"
];
}