Skip to content

Commit 34d2f3a

Browse files
authored
Only add tags to run command if set
1 parent 573107b commit 34d2f3a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bootstrap/bootstrap.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ func (g *Generator) Run() error {
187187
buildFlags := buildFlagsRegexp.FindAllString(g.GenBuildFlags, -1)
188188
execArgs = append(execArgs, buildFlags...)
189189
}
190-
execArgs = append(execArgs, "-tags", g.BuildTags, filepath.Base(path))
190+
if len(g.BuildTags) > 0 {
191+
execArgs = append(execArgs, "-tags", g.BuildTags)
192+
}
193+
execArgs = append(execArgs, filepath.Base(path))
191194
cmd := exec.Command("go", execArgs...)
192195

193196
cmd.Stdout = f

0 commit comments

Comments
 (0)