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

ERROR: #39

Closed wayneashleyberry closed 7 years ago

wayneashleyberry commented 7 years ago

Hello @carloscuesta!

Trying to use the gitmoji cli for the first time and it's not really working :/

OS: macOS 10.12.4 gitmoji-cli -v: 1.5.0 Node version: v7.9.0

Error Message:

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ gs
## master...origin/master
 M readme.md

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ gitmoji
? Choose a gitmoji: 💡  - Documenting source code.
? Enter the commit title: Docs
? Enter the commit message: Testing gitmoji...
? Issue / PR reference #:
? Signed commit: Yes
ERROR:

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   readme.md

no changes added to commit (use "git add" and/or "git commit -a")

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ gitmoji -c
? Choose a gitmoji: 📝  - Writing docs.
? Enter the commit title: Writing docs.
? Enter the commit message: Just playing around with gitmoji really...
? Issue / PR reference #:
? Signed commit: Yes
ERROR:
carloscuesta commented 7 years ago

🤔 Can you try to install the 1.4.0 version to see if you've got the same issue?

wayneashleyberry commented 7 years ago

Same problem with 1.4.0 @carloscuesta :(

Is there perhaps a verbose flag or debug environment variable I could set?

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ gitmoji -v
1.4.0

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ gitmoji -c
? Choose a gitmoji: (Use arrow keys)
❯ 🎨  - Improving structure / format of the code.
  ⚡️  - Improving performance.
  🔥  - Removing code or files.
  🐛  - Fixing a bug.
  🚑  - Critical hotfix.
  ✨  - Introducing new features.
  📝  - Writing docs.
(Move up and down to reveal more choices)

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ gitmoji -c
? Choose a gitmoji: 📝  - Writing docs.
? Enter the commit title: Writing docs.
? Enter the commit message: Just testing out gitmoji.
? Issue / PR reference #:
? Signed commit: Yes
ERROR:
carloscuesta commented 7 years ago

There's no debug flag but I'm taking a look into it to fix this issue @wayneashleyberry

Before using gitmoji -c did you run gitmoji -i ?

wayneashleyberry commented 7 years ago

Nope, I haven't run gitmoji -i at all.

carloscuesta commented 7 years ago

Another thing I have in mind, try to run gitmoji -g and answer y to the autoadd question, by default it's set to false. Then try to commit 🤔 @wayneashleyberry

screen shot 2017-04-13 at 15 15 44
wayneashleyberry commented 7 years ago

My changes weren't staged - so there was nothing to commit 🤦‍♂️

I feel like gitmoji should pick that up first maybe? Or maybe a better error message would help.

Git complains about this, and I feel gitmoji should have the same behaviour as it's almost a replacement for git commit

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ git commit -m 'foo'
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
    modified:   readme.md

no changes added to commit
~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   readme.md

no changes added to commit (use "git add" and/or "git commit -a")

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ git add readme.md

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

    modified:   readme.md

~/src/github.com/wayneashleyberry/wayne.cloud master*
❯ gitmoji -c
? Choose a gitmoji: 📝  - Writing docs.
? Enter the commit title: Writing docs.
? Enter the commit message: Just playing with gitmoji-cli!
? Issue / PR reference #:
? Signed commit: Yes
[master 8718f2f] :memo: Writing docs.
 1 file changed, 2 insertions(+)
carloscuesta commented 7 years ago

Yes totally!

In fact this issue comes from implementing the feature https://github.com/carloscuesta/gitmoji-cli/commit/ebce5ff0efb7f60febf8858f3df8b2af8920000e. We have to set a default value for that.

This is something that the cli should handle, thanks for taking your time to report this issue ❤️

By the way this is related with #37

carloscuesta commented 7 years ago

Released :tada: @ v1.5.1 @wayneashleyberry

wayneashleyberry commented 7 years ago

Thanks for that @carloscuesta :)