summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2024-08-27 12:11:32 +0200
committerPaul Holzinger <pholzing@redhat.com>2024-08-27 12:11:32 +0200
commitdc724e5e806833afe0a9cf39b125dc198b612ba7 (patch)
tree1cf0135caa0d1b053d9b3d5a3f0c45898ddb5692 /cmd
parent8e78028e2c8d67963dadc5def5619ca69f858034 (diff)
run: fix detach passthrough and --rmi
When we use passthrough logging and the --rmi option should not try to delete the image right away. Simply speak passthough only means do not print the cotnainer id but we should never try to delete the image here as this will be done in the cleanup process. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/containers/run.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go
index 8abd08837..924f1198e 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -237,8 +237,10 @@ func run(cmd *cobra.Command, args []string) error {
return err
}
- if runOpts.Detach && !passthrough {
- fmt.Println(report.Id)
+ if runOpts.Detach {
+ if !passthrough {
+ fmt.Println(report.Id)
+ }
return nil
}
if runRmi {