We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d50b3b1 commit 9f83b18Copy full SHA for 9f83b18
client/llb/definition.go
@@ -29,9 +29,11 @@ type DefinitionOp struct {
29
inputCache *sync.Map // shared and written among DefinitionOps so avoid race on this map using sync.Map
30
}
31
32
+var empty = &pb.Definition{}
33
+
34
// NewDefinitionOp returns a new operation from a marshalled definition.
35
func NewDefinitionOp(def *pb.Definition) (*DefinitionOp, error) {
- if def == nil {
36
+ if def == nil || proto.Equal(def, empty) {
37
return nil, errors.New("invalid nil input definition to definition op")
38
39
0 commit comments