Skip to content

Commit da71fd4

Browse files
committed
use better definition for spec validation
1 parent 00de940 commit da71fd4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugin/plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ func (p *Plugin) Init(ctx context.Context, spec []byte, options NewClientOptions
141141
defer p.mu.Unlock()
142142
var err error
143143

144-
if len(spec) > 0 && p.schemaValidator != nil {
144+
if !options.NoConnection && p.schemaValidator != nil {
145145
var v any
146146
if err := json.Unmarshal(spec, &v); err != nil {
147147
return fmt.Errorf("failed to unmarshal plugin spec: %w", err)

0 commit comments

Comments
 (0)