-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: stat /dev/null/pre-push: not a directory 32.06 ELIFECYCLE Command failed with exit code 1. #669
Comments
Please, don't install lefthook in the CI environment. I think you should explicitly specify this in your "prepare": "[ -z $CI ] && lefthook install" And if you use |
Hey! Do you still have issues with lefthook auto install? |
having similar issues during local install
|
@ragrag what does |
@mrexox thank you, when i run this in the repo root i get |
Looks like you have the git hooks configured to /dev/null. Please restore using this command: |
@mrexox thank you for the help that did it! |
would it make sense for lefthook to automatically set this when its incorrectly /dev/null? i seem to have this on all new git repos by default, (forgive me i'm not so fluent in git) |
@ragrag you probably have a global config Sometimes people use different |
🔧 Summary
This error happens when execute 'lefthook install' command in a docker build command with a react UI project.(in CICD ENV)
However, we can not encounter the same error in local PC when manually build an image with docker command.
The command pre-push is located at .git/command not the location '/dev/null/pre-push'
It seems that the method to get the command(pre-push) location(dir) is not correct in some conditions.
Lefthook version 1.5.0/1.6.5
Steps to reproduce
docker build --no-cache --network=host --pull --build-arg GOPROXY= --build-arg VERSION= --build-arg GIT_COMMIT= -t -f ./Dockerfile.test .
Dockerfile.test:
RUN pnpm i
package.json:
"prepare": "lefthook install",
Expected results
The command 'RUN pnpm i ' should be executed successfully and image should be built successfullly.
Actual results
Error: stat /dev/null/pre-push: not a directory 32.06 ELIFECYCLE Command failed with exit code 1.
Possible Solution
Logs / Screenshots
The text was updated successfully, but these errors were encountered: