summaryrefslogtreecommitdiff
path: root/build.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-03 13:24:41 -0600
committerJeff Carr <[email protected]>2024-12-03 13:24:41 -0600
commit3600dbed8ceca3253afcd6b6ce1ee3f941aef30d (patch)
tree9eda700b2d8efce5bba61558af33b15b919df844 /build.go
parentdfae92e3c35e445e5a8098c720cac9b8d3f969c8 (diff)
unbelievable. rill is great.
Diffstat (limited to 'build.go')
-rw-r--r--build.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/build.go b/build.go
index 697f558..0b8b58a 100644
--- a/build.go
+++ b/build.go
@@ -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))
}
}