Skip to content

--install-hooks doesn't install all hooks #1160

@hinricht

Description

@hinricht

Summary

Given this config below, I would assume that prek install --install-hooks would install .git/hooks/commit-msg and .git/hooks/pre-push, but it doesn't:

❯ prek install
prek installed at `.git/hooks/pre-commit`
❯ prek install --install-hooks
prek installed at `.git/hooks/pre-commit`

I need to manually install the hooks with:

❯ prek install --hook-type commit-msg --hook-type pre-push
prek installed at `.git/hooks/commit-msg`
prek installed at `.git/hooks/pre-push`

The --install-hooks perameter is decribed in the help output with:

Create hook environments for all hooks used in the config file

Shouldn't it then auto-detect and install all configured hook (types) ?
Maybe I get it wrong though.

Platform

Linux 6.16.8-1-MANJARO x86_64 GNU/Linux

Version

prek 0.2.3

.pre-commit-config.yaml


repos:

Log file

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions