Description
According to the documentation, lefthook-local.yml can be used without a main configuration file:
The -local config can be used without a main config file.
However, when only lefthook-local.yml exists, lefthook install reports that no config was found and creates a sample lefthook.yml.
Setting LEFTHOOK_CONFIG=lefthook-local.yml is a possible workaround, but lefthook install should recognize the documented local-only configuration natively.
lefthook.yml
none
Commands to reproduce
export LEFTHOOK_VERBOSE=true
- Create a repository without
lefthook.yml.
- Create only
lefthook-local.yml:
pre-commit:
jobs:
- name: check
run: echo check
- Run
lefthook install
- Lefthook creates
lefthook.yml and install hooks
Lefthook version
2.1.10
Possible solution
If the project has lefthook-local.yml, lefthook install should install hooks without lefthook.yml
Description
According to the documentation,
lefthook-local.ymlcan be used without a main configuration file:However, when only
lefthook-local.ymlexists,lefthook installreports that no config was found and creates a samplelefthook.yml.Setting
LEFTHOOK_CONFIG=lefthook-local.ymlis a possible workaround, butlefthook installshould recognize the documented local-only configuration natively.lefthook.ymlnone
Commands to reproduce
export LEFTHOOK_VERBOSE=truelefthook.yml.lefthook-local.yml:lefthook installlefthook.ymland install hooksLefthook version
2.1.10
Possible solution
If the project has
lefthook-local.yml,lefthook installshould install hooks withoutlefthook.yml