zeenix / gimoji

Easily add emojis to your git commit messages 😎
MIT License
32 stars 10 forks source link

gimoji does not exit the process properly with Ctrl+c / escape #86

Closed jonlinkens closed 7 months ago

jonlinkens commented 7 months ago

First off, thanks for making this - the delay before gitmoji starts gets really annoying!

I've noticed that if you use this and cancel out of gimoji - either with ctrl+c or escape - it will continue to the commit message editor, when ideally it should exit the process and not reach the commit message editor.

An easy way to reproduce this is to run gimoji && echo "hello world". You'll see that when you exit gimoji, hello world is still outputted to the console - it shouldn't be, because gimoji did not finish successfully.

Hopefully that makes sense, I will open a PR with my tiny proposed change in a few minutes for you to consider

zeenix commented 7 months ago

I've noticed that if you use this and cancel out of gimoji - either with ctrl+c or escape - it will continue to the commit message editor, when ideally it should exit the process and not reach the commit message editor.

Actually, this was on propose. The idea is that gimoji can be quickly and easily skipped if the use chooses so. That doesn't mean that user wants to cancel committing all together. They can do that after, if they like.

So I'm afraid I'll have to revert your PR. I'm terribly sorry for not paying proper attention to this before.

Having said that, I'd be happy to accept a PR that exits the process on CTRL+C (but only Esc).

jonlinkens commented 7 months ago

No problem, your reasoning makes sense. I'll open a PR that exits the process only on Ctrl+C shortly.