diff options
author | Toshiki Sonoda <sonoda.toshiki@fujitsu.com> | 2022-08-23 09:58:34 +0900 |
---|---|---|
committer | Toshiki Sonoda <sonoda.toshiki@fujitsu.com> | 2022-08-23 09:58:34 +0900 |
commit | 716ac1c866787d7d6b1ee8b800da527fd5b980d0 (patch) | |
tree | 843e45cf642c1a353bd6717f5595d35577cbe0de /cmd | |
parent | 51d4b88ce976708de88ce041a03d6d65dd4c8d0e (diff) | |
download | podman-716ac1c866787d7d6b1ee8b800da527fd5b980d0.tar.gz podman-716ac1c866787d7d6b1ee8b800da527fd5b980d0.tar.bz2 podman-716ac1c866787d7d6b1ee8b800da527fd5b980d0.zip |
Refactor: About the RawInput process
Refactor the RawInput process of the `rm` and
`start` subcommands, like the other subcommands
such as `restart, stop, etc`.
[NO NEW TESTS NEEDED]
Signed-off-by: Toshiki Sonoda <sonoda.toshiki@fujitsu.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/podman/containers/rm.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cmd/podman/containers/rm.go b/cmd/podman/containers/rm.go index 1e3976389..9c760e752 100644 --- a/cmd/podman/containers/rm.go +++ b/cmd/podman/containers/rm.go @@ -149,7 +149,8 @@ func removeContainers(namesOrIDs []string, rmOptions entities.RmOptions, setExit return err } for _, r := range responses { - if r.Err != nil { + switch { + case r.Err != nil: if errors.Is(r.Err, define.ErrWillDeadlock) { logrus.Errorf("Potential deadlock detected - please run 'podman system renumber' to resolve") } @@ -160,8 +161,10 @@ func removeContainers(namesOrIDs []string, rmOptions entities.RmOptions, setExit setExitCode(r.Err) } errs = append(errs, r.Err) - } else { + case r.RawInput != "": fmt.Println(r.RawInput) + default: + fmt.Println(r.Id) } } return errs.PrintErrors() |