include the output from a pre-push commit hook failure
See original GitHub issueI’m running tsc
and tslint
in a pre-push hook, and GitHub Desktop shows a message when the hook finds a problem: “error Command failed with exit code 1”.
It would be useful if this message included the output from the git hook, to help with diagnosing the problem.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:8 (7 by maintainers)
Top Results From Across the Web
husky > pre-commit hook failed (add --no-verify to bypass)
In my case I started getting husky > pre-commit hook failed (add --no-verify to bypass) once some dependencies have been updated.
Read more >Show the output of the git hook scripts : IDEA-82777 - YouTrack
A colleague just pointed me to another view within PyCharm that correctly displays the pre-commit output: The git console (you might have to...
Read more >Failing to get commit message from pre push git hook - Support
Hi, I am trying to get the commit message during the git pre push hook stage, but it is not retrieving the message...
Read more >Getting Started with Git Hooks and Husky | Tower Blog
When you have some Git hooks configured in Husky, you will get an error message ... husky - pre-commit hook exited with code...
Read more >Supported hooks - pre-commit
check-docstring-first - checks a common error of defining a docstring after code. check-executables-have-shebangs - ensures that (non-binary) executables have a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m only talking about pre-push hooks, but https://github.com/desktop/desktop/issues/5325#issuecomment-410066732 is about pre-commit hooks.
In this particular case I’m running
tsc --noEmit --project tsconfig.json && tslint --project tsconfig.json
as a pre-push hook via husky, and this is the output when runninggit push
from the command line:When pushing in GitHub Desktop, the only output displayed in the error alert is this:
The output from husky when running the same script as a pre-commit hook is identical:
When run as a pre-commit hook, GitHub Desktop displays the full output:
I also bumped into this issue when using a
pre-push
hook. I am new to this project but will attempt a PR 🙂