Skip to content

Commit 68ab348

Browse files
Ensure that errors building with Depot are properly captured (#3808)
1 parent ef58457 commit 68ab348

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

internal/build/imgsrc/depot.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ func depotBuild(ctx context.Context, streams *iostreams.IOStreams, opts ImageOpt
115115
streams.StopProgressIndicator()
116116
return nil, buildErr
117117
}
118-
defer build.Finish(buildErr)
119-
defer buildkit.Release()
118+
defer func() {
119+
buildkit.Release()
120+
build.Finish(buildErr)
121+
}()
120122

121123
connectCtx, cancelConnect := context.WithTimeout(ctx, 5*time.Minute)
122124
defer cancelConnect()

0 commit comments

Comments
 (0)