diff --git a/compose/automation/expr_types.go b/compose/automation/expr_types.go index 2487e5e21..4dfd53339 100644 --- a/compose/automation/expr_types.go +++ b/compose/automation/expr_types.go @@ -55,6 +55,10 @@ func CastToComposeRecord(val interface{}) (out *types.Record, err error) { } switch val := expr.UntypedValue(val).(type) { case *types.Record: + if val == nil { + val = &types.Record{} + } + if val.Values == nil { val.Values = types.RecordValueSet{} }