mirror of
https://github.com/nix-community/home-manager.git
synced 2026-06-05 21:02:51 +00:00
claude-code: mark hook scripts executable
Inline hooks are scripts, so write them with the executable bit set. Add NMT assertions covering default and custom config directories.
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
assertFileExists home-files/.config/claude/commands/hello.md
|
||||
assertFileExists home-files/.config/claude/rules/style.md
|
||||
assertFileExists home-files/.config/claude/hooks/pre-edit
|
||||
assertFileIsExecutable home-files/.config/claude/hooks/pre-edit
|
||||
assertFileExists home-files/.config/claude/output-styles/concise.md
|
||||
assertFileExists home-files/.config/claude/skills/pdf/SKILL.md
|
||||
|
||||
|
||||
@@ -135,9 +135,11 @@
|
||||
assertFileContent home-files/.claude/commands/commit.md ${./expected-commit}
|
||||
|
||||
assertFileExists home-files/.claude/hooks/pre-edit
|
||||
assertFileIsExecutable home-files/.claude/hooks/pre-edit
|
||||
assertFileRegex home-files/.claude/hooks/pre-edit "About to edit file"
|
||||
|
||||
assertFileExists home-files/.claude/hooks/post-commit
|
||||
assertFileIsExecutable home-files/.claude/hooks/post-commit
|
||||
assertFileRegex home-files/.claude/hooks/post-commit "Committed with message"
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user