diff --git a/plugin/plugin.go b/plugin/plugin.go index 20427bfff5..a1818d94d2 100644 --- a/plugin/plugin.go +++ b/plugin/plugin.go @@ -141,7 +141,7 @@ func (p *Plugin) Init(ctx context.Context, spec []byte, options NewClientOptions defer p.mu.Unlock() var err error - if p.schemaValidator != nil { + if len(spec) > 0 && p.schemaValidator != nil { var v any if err := json.Unmarshal(spec, &v); err != nil { return fmt.Errorf("failed to unmarshal plugin spec: %w", err)