Closed EntePF closed 2 years ago
Hey! Thanks for opening the issue.
I tried reproducing installing a fresh copy of gitmoji, wiping out the stored configuration and the issue doesn't happen.
We have configuration defaults defined for every option in the CLI when no preferences are found as you can see here:
What is completely possible, is to set the response for the gitmojis api url
prompt to an empty " "
string which causes the issue that you mentioned 🤔
Even with that I'm still able to execute the gitmoji -g
to set the URL again, there's no need to downgrade to previous versions
I will add some validations to the scope
prompt so to make users users introduce a valid url when running the config command
I am also not able to reproduce it anymore. Maybe some bad value (undefined/null/empty) had made its way into my config previously. But your idea to validate the input, so there should never be an invalid url, is great. Thanks for your awesome work.
Describe the bug
Hi @carloscuesta,
today I updated my gitmoji cask and after that it threw the following error when trying to
git commit
:Also
gitmoji -g
threw this error. I switched to the npm package to install an older version and fix my configuration. But this error showed up in all versions down to 5.0.0 and all the default settings after a clean installation.Workaround:
With version 5.3.0 I could change the settings using
gitmoji -g
and? Set gitmojis api url https://gitmoji.dev/api/gitmojis
(instead of leaving it empty) This fixed the issue. After upgrading to 6.1.0 it's still working.My 2 cents
I guess the variable is set to an invalid value by default and all commands try to load and validate the config and therefore fail. I think there should be a fail-safe to ignore this value if it's invalid or override it with something valid.
Reproduction
Do a clean installation of gitmoji. Or leave all fields empty when
gitmoji -g
System Info
Validations