From e9e5d1e95832c1bf18ab2a823285fd2d8a021d34 Mon Sep 17 00:00:00 2001 From: kjuulh Date: Mon, 31 Oct 2022 00:35:40 +0100 Subject: [PATCH] with err exit --- pkg/pipelines/golang-bin.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/pipelines/golang-bin.go b/pkg/pipelines/golang-bin.go index 478965a..35a271e 100644 --- a/pkg/pipelines/golang-bin.go +++ b/pkg/pipelines/golang-bin.go @@ -82,7 +82,12 @@ func (p *Pipeline) WithGolangBin(opts *GolangBinOpts) *Pipeline { c = c.Exec(dagger.ContainerExecOpts{ Args: []string{"mkdir", "-p", binpath}, }) - c, err := container.MountFileFromLoaded(ctx, c, bin, usrbin) + _, err := c.ExitCode(ctx) + if err != nil { + return err + } + + c, err = container.MountFileFromLoaded(ctx, c, bin, usrbin) if err != nil { return err }