Closed perqa closed 1 month ago
Hi, It's looks like the problem not related to repository itself. What version of node do you use?
I'm using Sourcetree, and I wasn't quite sure which node version it uses, so I added a few lines of code to the pre-commit script to set a particular node version via nvm
. Unfortunately, using node v18.9 results in the same error.
Now using node v18.9.0 (npm v8.19.1)
Lefthook v1.4.9
RUNNING HOOK: [1mpre-commit[0m
error replacing {files}: exit status 128
[1mlint[0m: (skip) error
error replacing {files}: exit status 128
[1mtypes[0m: (skip) error
SUMMARY: (SKIP EMPTY)
Lefthook v1.4.9
RUNNING HOOK: [1mcommit-msg[0m
EXECUTE > [1mcommitlint[0m
The "original" argument must be of type function
exit status 1
SUMMARY: (done in 0.21 seconds)
🥊 commitlint
Completed with errors, see above
I know that this is old issue, but it's not related to this lib. Anyway for more details we need following command to get more details of issue in Lefthook:
LEFTHOOK_VERBOSE=1 npx lefthook run pre-commit
Probably it's related to missing git upstream branch.
Closing.
Hello, and thanks for a useful library!
I cloned the repo, and did some minor code changes. Trying to commit those changes, I get the following error message:
I have no previous experience from using Lefthook. Any ideas what I need to change to be able to run the pre-commit hook? I'm on MacOS 12.4 (Monterey).