From 6176874559f057ee84f5037e5bc75bc8ad2dfc4a Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 20 Jun 2019 17:46:14 -0400 Subject: [PATCH] Don't return an error if storagepacker is told to delete no items Just be idempotent -- nothing to delete means nothing to do --- helper/storagepacker/storagepacker.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helper/storagepacker/storagepacker.go b/helper/storagepacker/storagepacker.go index e20b46e1f454..5bb7a72571ce 100644 --- a/helper/storagepacker/storagepacker.go +++ b/helper/storagepacker/storagepacker.go @@ -132,7 +132,8 @@ func (s *StoragePacker) DeleteMultipleItems(ctx context.Context, logger hclog.Lo var err error switch len(itemIDs) { case 0: - return fmt.Errorf("no items IDs given") + // Nothing + return nil case 1: logger = hclog.NewNullLogger()