From 5a8864abb2145da52d95ec0b1dfa49c6cf9af5dd Mon Sep 17 00:00:00 2001 From: Parker Van Roy Date: Wed, 7 Oct 2020 14:54:11 -0400 Subject: [PATCH] solves docker inconsistency for podman attach x Signed-off-by: Parker Van Roy --- pkg/domain/infra/abi/containers.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go index ac7523094357..c6338b10d924 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -588,6 +588,9 @@ func (ic *ContainerEngine) ContainerAttach(ctx context.Context, nameOrID string, if err != nil && errors.Cause(err) != define.ErrDetach { return errors.Wrapf(err, "error attaching to container %s", ctr.ID()) } + // This write maintains compatibility with Docker on detach: + // 'run -it x' does not newline but 'attach x' prints this message and newlines + os.Stdout.WriteString("read escape sequence\n") return nil }