From 480cb2db5e23d850af063d2a1b4ffbadcf2cd300 Mon Sep 17 00:00:00 2001 From: Andy Librian Date: Thu, 15 Oct 2020 12:50:10 +0700 Subject: Update podman-remote run to handle detach keys addresses #7979 Signed-off-by: Andy Librian --- pkg/domain/infra/tunnel/containers.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/domain') diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 1bb4e68ac..5c36dfdb0 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -573,6 +573,10 @@ func (ic *ContainerEngine) ContainerRun(ctx context.Context, opts entities.Conta // Attach if err := startAndAttach(ic, con.ID, &opts.DetachKeys, opts.InputStream, opts.OutputStream, opts.ErrorStream); err != nil { + if err == define.ErrDetach { + return &report, nil + } + report.ExitCode = define.ExitCode(err) if opts.Rm { if rmErr := containers.Remove(ic.ClientCxt, con.ID, bindings.PFalse, bindings.PTrue); rmErr != nil { -- cgit v1.2.3-54-g00ecf