We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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.
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",
The command 'RUN pnpm i ' should be executed successfully and image should be built successfullly.
Error: stat /dev/null/pre-push: not a directory 32.06 ELIFECYCLE Command failed with exit code 1.
LEFTHOOK_VERBOSE=true git ...
The text was updated successfully, but these errors were encountered:
Please, don't install lefthook in the CI environment. I think you should explicitly specify this in your prepare script. Something like this:
prepare
"prepare": "[ -z $CI ] && lefthook install"
And if you use lefthook npm package it already handles this out of the box. You don't need an explicit lefthook install in the prepare script.
lefthook
lefthook install
Sorry, something went wrong.
Hey! Do you still have issues with lefthook auto install?
No branches or pull requests
🔧 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: