Skip to content

Commit

Permalink
add support to giving an explicit path to lefthook in git hook. usefu…
Browse files Browse the repository at this point in the history
…l for developing
  • Loading branch information
technicalpickles committed Feb 28, 2024
1 parent 7704695 commit 53cb90d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/templates/hook.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ call_lefthook()
osArch=$(uname | tr '[:upper:]' '[:lower:]')
cpuArch=$(uname -m | sed 's/aarch64/arm64/')

if lefthook{{.Extension}} -h >/dev/null 2>&1
if test -n "$LEFTHOOK_PATH"
then
"$LEFTHOOK_PATH" "$@"
elif lefthook{{.Extension}} -h >/dev/null 2>&1
then
lefthook{{.Extension}} "$@"
{{if .Extension -}}
Expand Down

0 comments on commit 53cb90d

Please sign in to comment.