diff options
Diffstat (limited to 'build.go')
| -rw-r--r-- | build.go | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -91,12 +91,17 @@ func (f *Forge) doBuild(repo *gitpb.Repo, userFlags []string, goWhat string) err } log.Info("running:", cmd) - if r := repo.RunRealtime(cmd); r.Error == nil { - // log.Warn("go build worked") + result := repo.RunRealtime(cmd) + if result.Exit == 0 { + log.Info(strings.Join(result.Stdout, "\n")) return nil } else { + log.DaemonMode(true) + log.Info(strings.Join(result.Stdout, "\n")) + log.Info(strings.Join(result.Stderr, "\n")) + log.DaemonMode(false) log.Warn("go build failed", cmd) - return errors.New("go build failed: " + fmt.Sprint(r.Error)) + return errors.New("go build failed: " + fmt.Sprint(result.Error)) } } |
