Error when not under git
letsar opened this issue · comments
If we try to run build_runner with this package on a folder which is not a git repository we have the following error:
[SEVERE] build_flutter_version on lib/$lib$:
ProcessException: stdout:
stderr:
fatal: Not a git repository (or any of the parent directories): .git
It would be nice if the build process didn't end with an error and just ignore the git data part (Maybe with a warning instead).
Yep it try to get the last git version.
On first phase I plan to make this a requirement then late generate partial field on the Version class if not present.
What's your feeling on this ?
Initialise myself a .git dir would be too much intrusive ? or should be available as an option ?
I think it would be better if it was just an option. Setting gitInfo
to null
in this case.
I'll go further by not generating the gitInfo field.