diff options
author | Brent Baude <bbaude@redhat.com> | 2020-04-14 13:20:59 -0500 |
---|---|---|
committer | Brent Baude <bbaude@redhat.com> | 2020-04-14 19:47:49 -0500 |
commit | 60dde457f6dc5ec5062a946dbd0848a2b0b06a22 (patch) | |
tree | d2ff642f668c58860f6e3aa03f1356fb84b95a1d /cmd/podmanV2/images/rm.go | |
parent | f0b6cdede554316643187d40c67684daf5a2a2bb (diff) | |
download | podman-60dde457f6dc5ec5062a946dbd0848a2b0b06a22.tar.gz podman-60dde457f6dc5ec5062a946dbd0848a2b0b06a22.tar.bz2 podman-60dde457f6dc5ec5062a946dbd0848a2b0b06a22.zip |
More system test fixes on regressions
Fix more regressions between v1 and v2
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'cmd/podmanV2/images/rm.go')
-rw-r--r-- | cmd/podmanV2/images/rm.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/podmanV2/images/rm.go b/cmd/podmanV2/images/rm.go index bb5880de3..6784182d9 100644 --- a/cmd/podmanV2/images/rm.go +++ b/cmd/podmanV2/images/rm.go @@ -8,6 +8,7 @@ import ( "github.com/containers/libpod/pkg/domain/entities" "github.com/pkg/errors" "github.com/spf13/cobra" + "github.com/spf13/pflag" ) var ( @@ -33,11 +34,13 @@ func init() { Parent: imageCmd, }) - flags := rmCmd.Flags() + imageRemoveFlagSet(rmCmd.Flags()) +} + +func imageRemoveFlagSet(flags *pflag.FlagSet) { flags.BoolVarP(&imageOpts.All, "all", "a", false, "Remove all images") flags.BoolVarP(&imageOpts.Force, "force", "f", false, "Force Removal of the image") } - func rm(cmd *cobra.Command, args []string) error { if len(args) < 1 && !imageOpts.All { @@ -46,7 +49,6 @@ func rm(cmd *cobra.Command, args []string) error { if len(args) > 0 && imageOpts.All { return errors.Errorf("when using the --all switch, you may not pass any images names or IDs") } - report, err := registry.ImageEngine().Delete(registry.GetContext(), args, imageOpts) if err != nil { switch { |