carloscuesta / gitmoji-cli

A gitmoji interactive cli tool for using emojis on commits. 💻
https://www.npmjs.com/package/gitmoji-cli
MIT License
4.59k stars 206 forks source link

Repeat output when initialized as a commit hook [Windows 10] #211

Closed HusamElbashir closed 4 years ago

HusamElbashir commented 4 years ago

Hello @carloscuesta!

This issue only happens when I initialize gitmoji as a commit hook. When I try to pick a gitmoji or type a commit message the output is repeated on the console. See the screenshot below ..

Again this doesn't happen when I commit with gitmoji -c.

OS: Windows 10 gitmoji-cli -v: 2.0.0 Node version: 12.7.0

screenshot

israelKusayev commented 4 years ago

Same to me (windows 10)

carloscuesta commented 4 years ago

Hey @HusamIbrahim @israelKusayev

Can you confirm is this still happening at 3.0.0 ?

Thanks

HusamElbashir commented 4 years ago

Yes I can confirm this is still happening in 3.0.0.

carloscuesta commented 4 years ago

If you say that with gitmoji -c you don’t have any problems it must be something related with this I suppose

https://github.com/carloscuesta/gitmoji-cli/blob/77b4e56e6f0252a2a8ad0b8afae59491d13b0ec2/src/commands/commit/withHook/index.js#L12

Unfortunately I do not have a Windows machine to test this on. So I can’t reproduce this bug 😕

carloscuesta commented 4 years ago

Yup that's an inquirer.js bug https://github.com/SBoudrias/Inquirer.js/issues/793