From 89596953490f3726adcd54e198bb52e8e48da0af Mon Sep 17 00:00:00 2001 From: celogeek <65178+celogeek@users.noreply.github.com> Date: Sun, 2 Jan 2022 11:30:37 +0100 Subject: [PATCH] return error if no image to tag --- cmd/piwigo-cli/images_tag.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/piwigo-cli/images_tag.go b/cmd/piwigo-cli/images_tag.go index 300fa3c..8849304 100644 --- a/cmd/piwigo-cli/images_tag.go +++ b/cmd/piwigo-cli/images_tag.go @@ -86,6 +86,10 @@ func (c *ImagesTagCommand) Execute(args []string) error { } } + if len(imagesToTags) == 0 { + return fmt.Errorf("no image to tag") + } + for _, imgId := range imagesToTags { for { var imgDetails piwigotools.ImageDetails