lefthook
lefthook copied to clipboard
Explain how "run" runs whatever it is its value represents
:zap: Summary
As far as I could see, the run
documentation doesn't explain what the value for that configuration is beyond a "command", nor how Lefthook actually runs it, e.g direct invocation, though sh
, through bash
, etc.
Value
It's really difficult to understand what kind of command can be used for run
, e.g. can pipes |
be used? Or &&
and ||
? Can the exit code $?
of a command be checked with if
? Are scripts even supported at all? What's the behavior of multiple lines (using run: |
)? Will execution automatically stop at the first error? etc…
Behavior and configuration changes
Documenting the current behavior.