Skip to content

Commit

Permalink
Only add tags to run command if set
Browse files Browse the repository at this point in the history
  • Loading branch information
niallnsec authored Jan 28, 2024
1 parent 573107b commit 34d2f3a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bootstrap/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ func (g *Generator) Run() error {
buildFlags := buildFlagsRegexp.FindAllString(g.GenBuildFlags, -1)
execArgs = append(execArgs, buildFlags...)
}
execArgs = append(execArgs, "-tags", g.BuildTags, filepath.Base(path))
if len(g.BuildTags) > 0 {
execArgs = append(execArgs, "-tags", g.BuildTags)
}
execArgs = append(execArgs, filepath.Base(path))
cmd := exec.Command("go", execArgs...)

cmd.Stdout = f
Expand Down

0 comments on commit 34d2f3a

Please sign in to comment.