[generators] Generator assume global git config is setup #17787
Labels
bug
:Generator
Related to code generators for building custom Beats or modules.
needs_team
Indicates that the issue/PR needs a Team:* label
Stalled
The beat generator assumes that the global git config is setup when adding files to the newly created git repo. e.g it assumes that someone has done
The variables need to be set before the generator runs
git add
. So the generator should check if they are set. If they are not set then it can use data provided by the user creating the beat to set them on a non-global (repo level) basis. Or it could set the appropriate environment variables to pass the name and email to Git (see https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables).The generator tests can fail because of this issue. It does run these commands, but too late.
beats/generator/common/Makefile
Lines 15 to 16 in a846029
These values need to be set after the repo is
git init
'ed and beforegit add
, but it really can't as written since it's hard-coded to assume that the global git config is setup.beats/generator/common/beatgen/beatgen.go
Lines 130 to 141 in bbf9d66
The text was updated successfully, but these errors were encountered: