Closed giggio closed 2 months ago
Seems weird and like a small bug I supposedly fixed?
After installing git hook install
can you post the full ls -al $(git rev-parse --git-common-dir)/hooks
. It should contain a githooks-contains-run-wrappers
file. If not that is kind of weird. Are you sure that git hooks
is using the build executable from Nix and not the ~/.githooks/bin
thing still installed?
The relevant code which triggers this is :
if hasHooksConfigured &&
!localCoreHooksPathSet && !globalCoreHooksPathSet &&
!hasRunWrappers {
!hasRunWrappers
is the not existence of githooks-contains-run-wrappers
file inside the hook directory. Are you using workspaces?
BR
I reproduced the bug, thanks for the report. Its just awrong warning. Trying to fix it.
Found the typo in the warning logic: Fixing it in 30min, than it works hopefully.
@giggio: You should probably prefer to install only a link (core.hooksPath
) with git hooks install
. You can do this by git hooks uninstall
and cleaning git config githooks.maintainedHooks
(this settings will force run-wrappers into the current repo). You can set this to a meaningful value globally when git hooks installer
runs, to just maintain a set of meaningful hooks in the Githooks hooksDir
(=<install-prefix>/templates/hooks
)
I am no longer seeing failing messages, but I still see the bug of not installing:
But something ran, I see githooks.registered
is now set to true.
it installed, it set the core.hooksPath
.
Oh, yes, it did. So now we don't need the run wrappers on the local directory anymore? Ok, cool!
@giggio: Correct, it will only use run-wrappers on the local directory when you use --maintained-hooks
on git hooks install
You can also use that on githooks-installer
I just ran
git hooks install
and nothing changed in.git/hooks
. I ran it again and files showed up. I'm not sure what happened. Now I ran again and got this:list
is also listing errors. Hooks are installed, see output:I'm running git hooks from main, using nix.