Skip to content

Commit

Permalink
Simplify op.delete function logic
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyrZotov committed Dec 8, 2023
1 parent 4633372 commit eff8d2e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions onepassword/cli/op.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,7 @@ func (op *OP) delete(ctx context.Context, item *onepassword.Item, vaultUuid stri
}
item.Vault.ID = vaultUuid

err := op.execJson(ctx, nil, nil, p("item"), p("delete"), p(item.ID), f("vault", vaultUuid))
if err != nil {
return nil, err
}
return item, err
return nil, op.execJson(ctx, nil, nil, p("item"), p("delete"), p(item.ID), f("vault", vaultUuid))
}

func (op *OP) execJson(ctx context.Context, dst any, stdin []byte, args ...opArg) error {
Expand Down

0 comments on commit eff8d2e

Please sign in to comment.