Skip to content
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

IDEA Support #95

Closed
LeoVS09 opened this issue Dec 5, 2019 · 9 comments
Closed

IDEA Support #95

LeoVS09 opened this issue Dec 5, 2019 · 9 comments
Labels
bug Something isn't working

Comments

@LeoVS09
Copy link

LeoVS09 commented Dec 5, 2019

I using Jetbrains Webstorm and lefthook not working for me.
When I run commit through Webstorm
Commit failing with

Commit failed with error
 0 files committed, 6 files failed to commit: add generation top menu based on version of permissions
 .git/hooks/pre-commit: 7: .git/hooks/pre-commit: cannot open /dev/tty: No such device or address

Run on linux mint

When run by git commit in the terminal all working

@Arkweid
Copy link
Collaborator

Arkweid commented Dec 5, 2019

Hi, @LeoVS09 could you try it on v0.6.5? We have some changes in 0.6.6 about pty interface.

@jonekdahl
Copy link

Hi @Arkweid, I see the same error with 0.6.6 and IDEA on Ubuntu Linux. Reverting to 0.6.5 and reinstalling hooks (bundle exec lefhook install -f) fixes the problem for me.

@Arkweid Arkweid added the bug Something isn't working label Dec 10, 2019
@LeoVS09
Copy link
Author

LeoVS09 commented Dec 11, 2019

Was test multiple version, before each version install I delete .git/hooks and node_modules

  • For versions v0.6.3 and v0.6.5 hooks did not work at all from Webstorm, only work from the console
  • For version v0.6.6 failed with /dev/tty error

Also, we having the same error when running git commit in our Jenkins pipeline

@LeoVS09
Copy link
Author

LeoVS09 commented Dec 11, 2019

Am I not sure about changes between versions, but you can give version without changes in pty interface, but with other hooks install updates? Maybe it will work

@perifer
Copy link

perifer commented Dec 11, 2019

My team also run into this. I guess interactive pre-commit scripts are tricky if you are using a GUI (introduced in #94).

Some things we also noticed: In my GUI of choice, GitUp, I don't get the cannot open /dev/tty: No such device or address error when commiting. PHPStorm (which should be identical to WebStorm) get the error.

In both GitUp and PHPStorm we got the tty-error when using the GUI to push code. Not a big problem since we usually use the command line to push.

@yoannmoinet
Copy link

yoannmoinet commented Dec 13, 2019

I have the same error in VSCode as well.

Using 0.6.6.

I've commented the exec < /dev/tty in the .git/hooks/pre-commit file in the meantime.
It's working fine in the editor and the terminal.

@Arkweid
Copy link
Collaborator

Arkweid commented Dec 13, 2019

Going to fix that on this wekeend!

@Arkweid
Copy link
Collaborator

Arkweid commented Dec 14, 2019

Fixed in 0.6.7
Works well in my VS Code editor. Let me know if problem exists in any other IDE

@Arkweid Arkweid closed this as completed Dec 14, 2019
@juslintek
Copy link

juslintek commented Sep 3, 2020

@Arkweid problem still exists in PhpStorm, seems like it is not exiting push. Even if tests fail. As well it just fails and provides no feedback why, while pushing when you have for example bash script which executes command via docker running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants