diff --git a/cmd/templates/hook.tmpl b/cmd/templates/hook.tmpl index aca95246..4fbf82f4 100644 --- a/cmd/templates/hook.tmpl +++ b/cmd/templates/hook.tmpl @@ -14,19 +14,19 @@ call_lefthook() { if lefthook{{.Extension}} -h >/dev/null 2>&1 then - eval lefthook{{.Extension}} $1 + eval lefthook{{.Extension}} $@ elif test -f "$dir/node_modules/@arkweid/lefthook/bin/lefthook{{.Extension}}" then - eval "$dir/node_modules/@arkweid/lefthook/bin/lefthook{{.Extension}} $1" + eval "$dir/node_modules/@arkweid/lefthook/bin/lefthook{{.Extension}} $@" elif bundle exec lefthook -h >/dev/null 2>&1 then - bundle exec lefthook $1 + bundle exec lefthook $@ elif npx @arkweid/lefthook -h >/dev/null 2>&1 then - npx lefthook $1 + npx lefthook $@ elif yarn lefthook -h >/dev/null 2>&1 then - yarn lefthook $1 + yarn lefthook $@ else echo "Can't find lefthook in PATH" fi diff --git a/spec/fixtures/pre-commit b/spec/fixtures/pre-commit index c887993d..fe9702ca 100644 --- a/spec/fixtures/pre-commit +++ b/spec/fixtures/pre-commit @@ -14,19 +14,19 @@ call_lefthook() { if lefthook -h >/dev/null 2>&1 then - eval lefthook $1 + eval lefthook $@ elif test -f "$dir/node_modules/@arkweid/lefthook/bin/lefthook" then - eval "$dir/node_modules/@arkweid/lefthook/bin/lefthook $1" + eval "$dir/node_modules/@arkweid/lefthook/bin/lefthook $@" elif bundle exec lefthook -h >/dev/null 2>&1 then - bundle exec lefthook $1 + bundle exec lefthook $@ elif npx lefthook -h >/dev/null 2>&1 then - npx lefthook $1 + npx lefthook $@ elif yarn lefthook -h >/dev/null 2>&1 then - yarn lefthook $1 + yarn lefthook $@ else echo "Can't find lefthook in PATH" fi diff --git a/spec/fixtures/pre-push b/spec/fixtures/pre-push index ada173a8..e855c935 100644 --- a/spec/fixtures/pre-push +++ b/spec/fixtures/pre-push @@ -14,19 +14,19 @@ call_lefthook() { if lefthook -h >/dev/null 2>&1 then - eval lefthook $1 + eval lefthook $@ elif test -f "$dir/node_modules/@arkweid/lefthook/bin/lefthook" then - eval "$dir/node_modules/@arkweid/lefthook/bin/lefthook $1" + eval "$dir/node_modules/@arkweid/lefthook/bin/lefthook $@" elif bundle exec lefthook -h >/dev/null 2>&1 then - bundle exec lefthook $1 + bundle exec lefthook $@ elif npx lefthook -h >/dev/null 2>&1 then - npx lefthook $1 + npx lefthook $@ elif yarn lefthook -h >/dev/null 2>&1 then - yarn lefthook $1 + yarn lefthook $@ else echo "Can't find lefthook in PATH" fi