Skip to content

Commit

Permalink
No need to search before Remove
Browse files Browse the repository at this point in the history
docker#2449 (comment)
Signed-off-by: Jennings Zhang <jenni_zh@protonmail.com>
  • Loading branch information
jennydaman committed Sep 13, 2020
1 parent ccdc4ed commit 30466e2
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions cli/command/manifest/rm.go
Expand Up @@ -3,7 +3,6 @@ package manifest
import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/pkg/errors"
"github.com/spf13/cobra"
)

Expand Down Expand Up @@ -34,14 +33,5 @@ func runRm(dockerCli command.Cli, opts rmOpts) error {
return err
}

manifests, err := dockerCli.ManifestStore().GetList(targetRef)
if err != nil {
return err
}

if len(manifests) == 0 {
return errors.Errorf("%s not found", targetRef)
}

return dockerCli.ManifestStore().Remove(targetRef)
}

0 comments on commit 30466e2

Please sign in to comment.