Skip to content

Commit

Permalink
include go build output in build error (#1127)
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Hall <[email protected]>
  • Loading branch information
imjasonh authored Sep 7, 2023
1 parent 29d66fd commit daab1ac
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/build/gobuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,7 @@ func build(ctx context.Context, ip string, dir string, platform v1.Platform, con
if os.Getenv("KOCACHE") == "" {
os.RemoveAll(tmpDir)
}
log.Printf("Unexpected error running \"go build\": %v\n%v", err, output.String())
return "", fmt.Errorf("go build: %w", err)
return "", fmt.Errorf("go build: %w: %s", err, output.String())
}
return file, nil
}
Expand Down

0 comments on commit daab1ac

Please sign in to comment.