Skip to content

Commit

Permalink
bake: update --sync-output to use StatFile()
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Chadwell <[email protected]>
  • Loading branch information
jedevc committed Sep 26, 2022
1 parent 12900d8 commit 0857015
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,6 @@ func BuildWithResultHandler(ctx context.Context, drivers []DriverInfo, opt map[s
}

req := gateway.SolveRequest{
Evaluate: syncOutputs,
Frontend: so.Frontend,
FrontendOpt: so.FrontendAttrs,
FrontendInputs: frontendInputs,
Expand Down Expand Up @@ -1143,6 +1142,14 @@ func BuildWithResultHandler(ctx context.Context, drivers []DriverInfo, opt map[s
resultHandleFunc(dp.driverIndex, &ResultContext{cc, res})
}

if syncOutputs {
if ref := res.Ref; ref != nil {
ref.StatFile(ctx, gateway.StatRequest{Path: "/"})
}
for _, ref := range res.Refs {
ref.StatFile(ctx, gateway.StatRequest{Path: "/"})
}
}
buildGrp.Done()
if syncOutputs {
buildGrp.Wait()
Expand Down

0 comments on commit 0857015

Please sign in to comment.