From 34280779c7c61fa095b51d50c557cd329587b8c2 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Tue, 5 Mar 2024 10:15:40 +0300 Subject: [PATCH] fix: use swift package before npx --- internal/templates/hook.tmpl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/templates/hook.tmpl b/internal/templates/hook.tmpl index 2698b41a..7be2403a 100644 --- a/internal/templates/hook.tmpl +++ b/internal/templates/hook.tmpl @@ -54,12 +54,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}}