mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
controller: only capture the result when invoked through a controller
This ensures that the code used to capture and evaluated a result is only executed when built through the controller. Otherwise, no build result should be recorded. This ensures that new code added to capture and store the build result for debugging isn't used when BUILDX_EXPERIMENTAL is not set. Signed-off-by: Justin Chadwell <me@jedevc.com>
This commit is contained in:
@ -143,7 +143,7 @@ func serveCmd(dockerCli command.Cli) *cobra.Command {
|
||||
|
||||
// prepare server
|
||||
b := NewServer(func(ctx context.Context, options *controllerapi.BuildOptions, stdin io.Reader, statusChan chan *client.SolveStatus) (*client.SolveResponse, *build.ResultContext, error) {
|
||||
return cbuild.RunBuild(ctx, dockerCli, *options, stdin, "quiet", statusChan)
|
||||
return cbuild.RunBuild(ctx, dockerCli, *options, stdin, "quiet", statusChan, true)
|
||||
})
|
||||
defer b.Close()
|
||||
|
||||
|
Reference in New Issue
Block a user