-
Notifications
You must be signed in to change notification settings - Fork 249
feat: add env var to specify config path directly #1072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Could you share the problem you’re trying to solve, please? |
Sure, integration with Nix. Generating the config file from Nix, then wrapping lefthook to use that (eg |
@TECHNOFAB11 I see, so maybe a ENV variable would be a better choice? Lefthook can be run from within a git hook and there you can’t pass a |
@mrexox I generate the git hook files myself so both a cli arg or env var would be fine. |
@TECHNOFAB11 I’d better use just the ENV var because it’s more flexible and requires less code to implement. Also lefthook is kind of ”hidden” tool which runs implicitly by Git hooks, so I assume that ENV var would have more users. If there’s LEFTHOOK_CONFIG var set, let’s think that it overwrites any other configs (even lefthook-local.yml). By the way, do you need help implementing this? |
@mrexox sounds good, will modify the PR later today to use an env var instead 👍 |
Conflicts resolved 👍 |
Seems like a line got lost when fixing the conflicts, whoops, fixed :D |
⚡ Summary
Adds an env var "LEFTHOOK_CONFIG" to specify the config file, can be relative or absolute.
☑️ Checklist