Provide some lefthook env vars to the running command #422
jcook-uptycs
started this conversation in
Ideas
Replies: 2 comments
-
Hey! I think that you can use more explicit |
Beta Was this translation helpful? Give feedback.
0 replies
-
Here is a sample example. I find I am using the command name (ex pre-commit:
commands:
goimports:
glob: "{*.go}"
env:
GIT_PAGER: cat
run: |
go run golang.org/x/tools/cmd/goimports@latest -l -e -w {files}
git diff {files} > goimports.diff
git diff-files --quiet {files} ## fail if diff This could be used like either of these.
I understand my use case may be odd. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be helpful to have lefthook pass some lefthook related env vars to the command.
The first examples I have include
LEFTHOOK_HOOK
the hook that is running (ie pre-commit, commit-msg)LEFTHOOK_COMMAND
the name/key of the command being runBeta Was this translation helpful? Give feedback.
All reactions