diff --git a/main.go b/main.go index 013ed5a..7e3a26e 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "fmt" "html/template" "os" + "strings" "github.com/mlabouardy/nexus-cli/registry" "github.com/urfave/cli" @@ -241,6 +242,14 @@ func deleteImage(c *cli.Context) error { fmt.Printf("Only %d images are available\n", len(tags)) } } + } else if strings.Contains(tag, ",") { + tags := strings.Split(tag, ",") + for _, value := range tags { + err = r.DeleteImageByTag(imgName, value) + if err != nil { + return cli.NewExitError(err.Error(), 1) + } + } } else { err = r.DeleteImageByTag(imgName, tag) if err != nil {