Skip to content

git hooks install is not installing hooks or is showing failing messagesΒ #170

@giggio

Description

@giggio

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:

❯ git hooks install
🦎 Installed '22' Githooks run-wrapper(s) into '/home/user/.dotfiles/.git/hooks'
β›‘  Githooks are configured but Githooks seems not installed in '/home/user/.dotfiles/.git'.
   Neither 'core.hooksPath' set nor run-wrappers installed.
   Hooks might not run!

list is also listing errors. Hooks are installed, see output:

❯ ls -la .git/hooks/
drwxr-xr-x   - user user  2 May 01:24 .
drwxr-xr-x   - user user  2 May 01:24 ..
.rwxr-xr-x 754 user user  2 May 01:24 applypatch-msg
.rwxr-xr-x 754 user user  2 May 01:24 commit-msg
<REMOVED FOR BREVITY>

~/.dotfiles on ξ‚  main πŸ“1⇑1                                                                                                                                                                         at 01:24:46 
❯ git hooks list
β›‘  Githooks are configured but Githooks seems not installed in '/home/user/.dotfiles/.git'.
   Neither 'core.hooksPath' set nor run-wrappers installed.
   Hooks might not run!
🦎 Hook: 'pre-commit' [1]:
    Repository:
     β€’ '01-shellcheck.sh'  :  state: ['active', 'trusted'], type: 'repo', ns-path: 'ns:gh-self/pre-commit/01-shellcheck.sh'
🦎 Total listed hooks: '1'.

I'm running git hooks from main, using nix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions