From ebf0194d51542024f29c47e676874ef34ec64c33 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Wed, 16 Sep 2020 19:36:16 -0700 Subject: [PATCH] client: allow build callback to return nil result Signed-off-by: Tonis Tiigi --- frontend/gateway/grpcclient/client.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/frontend/gateway/grpcclient/client.go b/frontend/gateway/grpcclient/client.go index b0a2b2d2..35a3fa3f 100644 --- a/frontend/gateway/grpcclient/client.go +++ b/frontend/gateway/grpcclient/client.go @@ -171,6 +171,10 @@ func (c *grpcClient) Run(ctx context.Context, f client.BuildFunc) (retError erro return err } + if res == nil { + return nil + } + if err := c.caps.Supports(pb.CapReturnMap); len(res.Refs) > 1 && err != nil { return err }