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/infra') 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 From eefa3cbf6ea351667ab06020347c308d082bdf2c Mon Sep 17 00:00:00 2001 From: Andy Librian Date: Fri, 16 Oct 2020 19:43:50 +0700 Subject: Update podman-remote start --attach to handle detach keys fixes #7979 Signed-off-by: Andy Librian --- pkg/domain/infra/tunnel/containers.go | 1 - 1 file changed, 1 deletion(-) (limited to 'pkg/domain/infra') diff --git a/pkg/domain/infra/tunnel/containers.go b/pkg/domain/infra/tunnel/containers.go index 5c36dfdb0..eb591d23d 100644 --- a/pkg/domain/infra/tunnel/containers.go +++ b/pkg/domain/infra/tunnel/containers.go @@ -500,7 +500,6 @@ func (ic *ContainerEngine) ContainerStart(ctx context.Context, namesOrIds []stri if err == define.ErrDetach { // User manually detached // Exit cleanly immediately - report.Err = err reports = append(reports, &report) return reports, nil } -- cgit v1.2.3-54-g00ecf