diff options
author | Andy Librian <andylibrian@gmail.com> | 2020-10-15 12:50:10 +0700 |
---|---|---|
committer | Andy Librian <andylibrian@gmail.com> | 2020-10-16 19:44:29 +0700 |
commit | 480cb2db5e23d850af063d2a1b4ffbadcf2cd300 (patch) | |
tree | b6a1e6705a89ae7d0d79426928264a94859c7d1d /pkg/domain/infra/tunnel/containers.go | |
parent | fe1b6ccc85781a45d06303e986b1da573c828d2c (diff) | |
download | podman-480cb2db5e23d850af063d2a1b4ffbadcf2cd300.tar.gz podman-480cb2db5e23d850af063d2a1b4ffbadcf2cd300.tar.bz2 podman-480cb2db5e23d850af063d2a1b4ffbadcf2cd300.zip |
Update podman-remote run to handle detach keys
addresses #7979
Signed-off-by: Andy Librian <andylibrian@gmail.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/containers.go')
-rw-r--r-- | pkg/domain/infra/tunnel/containers.go | 4 |
1 files changed, 4 insertions, 0 deletions
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 { |