saschagrunert / git-journal

The Git Commit Message and Changelog Generation Framework :book:
MIT License
611 stars 18 forks source link

git journal complains a configuration file is missing at startup #91

Open Riduidel opened 5 years ago

Riduidel commented 5 years ago

When I use git journal on my windows box, I always have the following message displayed as first command

$ git journal                                                                                                     
Can't load configuration file, using default one: Le fichier spécifié est introuvable. (os error 2)

Is it because I have no cli.yaml file in my home dir ? (looking at the code, you seem to load that file at startup)

Riduidel commented 5 years ago

Well, no, cli.yaml is the clap configuration file stored in the crate, so it is another file ...

Ah ok, I've found the error line there https://github.com/saschagrunert/git-journal/blob/13986cbaec041e3827c4ca21866bdc00807595f8/src/lib.rs#L114

Ah ok (again). When config.load(....) is called, it looks for a .gitjournal.toml in current directory or parents.

Do you think it would be possible to change the error message for something more "noob-friendly" like "Unable to load .gitjournal.toml from current directory or parents. Take a look at sample .gitjournal.toml in documentation" ?