From 3768ab268b2311e8efcda29fcd4b28a47641a0eb Mon Sep 17 00:00:00 2001 From: Morlay Date: Wed, 21 Jul 2021 15:45:16 +0800 Subject: [PATCH] fix: should ignore nil client Signed-off-by: Morlay --- build/build.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/build.go b/build/build.go index 8c24795c..fa85ccf4 100644 --- a/build/build.go +++ b/build/build.go @@ -197,6 +197,10 @@ func resolveDrivers(ctx context.Context, drivers []DriverInfo, auth Auth, opt ma eg, ctx := errgroup.WithContext(ctx) for i, c := range clients { + if c == nil { + continue + } + func(i int, c *client.Client) { eg.Go(func() error { clients[i].Build(ctx, client.SolveOpt{}, "buildx", func(ctx context.Context, c gateway.Client) (*gateway.Result, error) {