Repository navigation
Commit 2132c2f
committed
fix(nix): let commits succeed in worktrees without a loaded dev shell
prek installs the hooks into the git common dir, so every worktree
shares them, but each hook reads the worktree's own untracked
.pre-commit-config.yaml symlink. That symlink only appears once the dev
shell has loaded, so in a fresh worktree (for example one created
outside `git wt`, which skips `direnv allow`) every commit aborted with
"config file not found".
git-hooks.nix exposes no option for prek's --allow-missing-config, so
the dev shell now reinstalls the hooks with it whenever an installed
hook lacks the flag. Worktrees with a loaded shell still run every hook.1 parent 4dcf7f5 commit 2132c2f
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
110 | 124 | | |
111 | 125 | | |
112 | 126 | | |
| |||
0 commit comments