Skip to content

Commit

Permalink
debug: build unsupported platforms with a warning
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Luhring <[email protected]>
  • Loading branch information
luhring committed Jun 10, 2024
1 parent 73a8a50 commit 1360ad6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/build/gobuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,7 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl
}
}
if g.debug && !doesPlatformSupportDebugging(*platform) {
log.Printf("image for platform %q will be built without debugging enabled because debugging is not supported for that platform", *platform)
return nil, fmt.Errorf("debugging is not supported for %s", platform)
}

Expand Down Expand Up @@ -1116,7 +1117,7 @@ func (g *gobuild) buildOne(ctx context.Context, refStr string, base v1.Image, pl
})

delvePath := "" // path for delve in image
if g.debug {
if g.debug && doesPlatformSupportDebugging(*platform) {
// get delve locally
delveBinary, err := getDelve(ctx, *platform)
if err != nil {
Expand Down

0 comments on commit 1360ad6

Please sign in to comment.