diff options
author | Paul Holzinger <pholzing@redhat.com> | 2024-08-27 12:11:32 +0200 |
---|---|---|
committer | Paul Holzinger <pholzing@redhat.com> | 2024-08-27 12:11:32 +0200 |
commit | dc724e5e806833afe0a9cf39b125dc198b612ba7 (patch) | |
tree | 1cf0135caa0d1b053d9b3d5a3f0c45898ddb5692 /cmd | |
parent | 8e78028e2c8d67963dadc5def5619ca69f858034 (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.go | 6 |
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 { |