Skip to content

Commit

Permalink
fix: use swift package before npx (#668)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox authored Mar 5, 2024
1 parent 3024a5b commit 33edff8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/templates/hook.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ call_lefthook()
elif pnpm lefthook -h >/dev/null 2>&1
then
pnpm lefthook "$@"
elif command -v npx >/dev/null 2>&1
then
npx lefthook "$@"
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
elif command -v npx >/dev/null 2>&1
then
npx lefthook "$@"
else
echo "Can't find lefthook in PATH"
{{- if .AssertLefthookInstalled}}
Expand Down

0 comments on commit 33edff8

Please sign in to comment.