aboutsummaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-16 14:21:49 +0100
committerGitHub <noreply@github.com>2021-12-16 14:21:49 +0100
commit91e55e263e860af24f176c5e62405a54ef7356de (patch)
tree51b2dd61e753b616c57544518ed9ab6b033addc2 /cmd/podman
parentd984fec351c06a95f8a51c7e6ced819c6b17245f (diff)
parent3b6510da68c4c72862aaae36b8cc77f4e165a434 (diff)
downloadpodman-91e55e263e860af24f176c5e62405a54ef7356de.tar.gz
podman-91e55e263e860af24f176c5e62405a54ef7356de.tar.bz2
podman-91e55e263e860af24f176c5e62405a54ef7356de.zip
Merge pull request #12603 from vrothberg/fix-kill
kill: fix output
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/containers/kill.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/cmd/podman/containers/kill.go b/cmd/podman/containers/kill.go
index 449484449..fe4083df8 100644
--- a/cmd/podman/containers/kill.go
+++ b/cmd/podman/containers/kill.go
@@ -108,10 +108,13 @@ func kill(_ *cobra.Command, args []string) error {
return err
}
for _, r := range responses {
- if r.Err == nil {
- fmt.Println(r.RawInput)
- } else {
+ switch {
+ case r.Err != nil:
errs = append(errs, r.Err)
+ case r.RawInput != "":
+ fmt.Println(r.RawInput)
+ default:
+ fmt.Println(r.Id)
}
}
return errs.PrintErrors()