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>
This commit is contained in:
Paul Holzinger 2024-08-27 12:11:32 +02:00
parent 8e78028e2c
commit dc724e5e80
No known key found for this signature in database
GPG key ID: EB145DD938A3CAF2

View file

@ -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 {