Skip to content

Commit

Permalink
Allows lefthook to work when node_modules is not in root folder for n…
Browse files Browse the repository at this point in the history
…px (#224)

npx will automatically install the module if not present. yarn does not do this and complains when the package.json is not found.
  • Loading branch information
spearmootz authored Sep 6, 2021
1 parent 9ba7d84 commit d65edc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/templates/hook.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ call_lefthook()
elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook $1
elif npx lefthook -h >/dev/null 2>&1
elif npx @arkweid/lefthook -h >/dev/null 2>&1
then
npx lefthook $1
elif yarn lefthook -h >/dev/null 2>&1
Expand Down

0 comments on commit d65edc8

Please sign in to comment.