-
Notifications
You must be signed in to change notification settings - Fork 552
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
prepre-commit-msg git hook breaks IDE #634
Comments
A PR would make my day. <3 |
@jimthedev I'll get to it later tonight. |
@eladchen - Thanks, just ran to the same issue! |
PR submitted. Sorry for the delay, have been busier than usual. |
jimthedev
pushed a commit
that referenced
this issue
Aug 14, 2019
The prepare-commit-msg git hook examples (bash & husky) assume /dev/tty is always true This change fails silently in case /dev/tty is false. See #634
I'm still getting this error with Visual Studio Code in my Ubuntu 😕 This is what I'm using to fix that instead of just ( exec < /dev/tty && git cz --hook --hook ) || true 2> /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
While integrating this tool I noticed that my IDE started to misbehave when it performed git operations.
The example in the docs offers the following approach, which assumes /dev/tty is always available:
The below uses a short-circuit to exit with an exit code of 0 in case tty is not available.
Using the above solved a case where my IDE got killed during a rebase
But I suspect that anything that interacts with git is susceptible to this pitfall.
Let me know if you agree, and i'll work on a PR.
P.S:
Found a case in point:
https://stackoverflow.com/questions/55815650/lint-staged-commitizen-configuration-suitable-for-command-line-and-intellij/56555664#56555664
The text was updated successfully, but these errors were encountered: