How to display error messages from commit hooks

Answered

I have a project with some pre-commit hooks defined as regular git hooks. When I commit chunks via the IntelliJ commit view those hooks get executed.

Some hooks perform validations that stop the commit in case they fail, which all works nicely.

The only thing bothering me is, that I do not see the output of these failed hooks in IntelliJ. Instead the error widget and log only show a stack trace about some invalid reflective access in IntelliJ which is not helpful. So I have then to re run these checks manually to see what was the actual cause.

Is there a way to display the hook output in the IDE?

0
4 comments
Avatar
Yaroslav Bedrov

Hello,

Please vote fo the related request on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-82777

1

Note that you can see the full output of hooks in the Console tab of the Git toolwindow

2

Thanks for the hint. That helps a lot 🙂

0
Avatar
Yaroslav Bedrov

You are welcome!

0

Please sign in to leave a comment.