diff --git a/internal/templates/hook.tmpl b/internal/templates/hook.tmpl index ad9c3e11..db3d7925 100644 --- a/internal/templates/hook.tmpl +++ b/internal/templates/hook.tmpl @@ -25,21 +25,24 @@ call_lefthook() then eval lefthook.bat $@ {{end -}} + elif test -f "$dir/node_modules/lefthook/bin/index.js" + then + eval "$dir/node_modules/lefthook/bin/index.js $@" elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}}" then eval "$dir/node_modules/@evilmartians/lefthook/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}} $@" elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}}" then eval "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook_${osArch}_${cpuArch}/lefthook{{.Extension}} $@" - elif test -f "$dir/node_modules/lefthook/bin/index.js" - then - eval "$dir/node_modules/lefthook/bin/index.js $@" elif bundle exec lefthook -h >/dev/null 2>&1 then bundle exec lefthook $@ elif yarn lefthook -h >/dev/null 2>&1 then yarn lefthook $@ + elif pnpm lefthook -h >/dev/null 2>&1 + then + pnpm lefthook $@ elif npx @evilmartians/lefthook -h >/dev/null 2>&1 then npx @evilmartians/lefthook $@