From 52a537c50e77658e3b1b9e7f6e498b333a7c9290 Mon Sep 17 00:00:00 2001 From: Carlos Alexandro Becker Date: Thu, 23 Mar 2017 18:32:27 -0300 Subject: [PATCH] err early --- pipeline/build/build.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pipeline/build/build.go b/pipeline/build/build.go index 3f2b46880..d5742a639 100644 --- a/pipeline/build/build.go +++ b/pipeline/build/build.go @@ -47,7 +47,9 @@ func (Pipe) Run(ctx *context.Context) error { }) } } - err := g.Wait() + if err := g.Wait(); err != nil { + return err + } if ctx.Config.Build.Hooks.Post != "" { log.Println("Running post-build hook", ctx.Config.Build.Hooks.Post) cmd := strings.Fields(ctx.Config.Build.Hooks.Post) @@ -55,7 +57,7 @@ func (Pipe) Run(ctx *context.Context) error { return err } } - return err + return nil } func build(name, goos, goarch string, ctx *context.Context) error {