Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unreachable conditional in hook template (#242)
Resolves #241 For devs who are using yarn as their package manager, the git hook templates are conditioned so that it will never attempt to run `yarn lefthook` from the local package it is installed in. Instead, the conditional will always end with `npx @arkweid/lefthook` which ends up fetching the package via network. In the worst case, the dev will fetch this package twice, once in the `elif` conditional and again within the `then` block, causing a significiant delay before the lefthook binary is executed. This degrades performance to an almost unusable state. To fix, give `yarn` a chance to find the lefthook binary within its local cache before moving on to `npx`.
- Loading branch information
352531c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dannobytes when can we expect it to be released? it's blocking my team from using lefthook
352531c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not my call, but looks like they'll be releasing it soon
#241 (comment)
352531c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry, I meant to ask @mrexox not you 😅
352531c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed #262 . Thanks!