Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Inputs on CLI get printed twice #21

Closed
minnn-minnn opened this issue Nov 15, 2018 · 9 comments
Closed

Inputs on CLI get printed twice #21

minnn-minnn opened this issue Nov 15, 2018 · 9 comments
Labels

Comments

@minnn-minnn
Copy link

Issue discovered when sshed onto a docker container started by batect (bash). Typed commands look like I have very shaky hands/or too much coffee.

e.g. make -> mmaakkee

It's pretty hard to read.

Batect version: 0.23
Container Image: Alpine 3.8

@charleskorn
Copy link
Collaborator

Thanks for the bug report @minnn-minnn.

Just to confirm, you're running bash inside a container (which is using alpine:3.8), and then SSHing into the container?

Could you perhaps send me a sample batect.yml and the commands you're running so that I can reproduce the problem here?

@minnn-minnn
Copy link
Author

Just to confirm, you're running bash inside a container (which is using alpine:3.8), and then SSHing into the container?

Yup.

Could you perhaps send me a sample batect.yml and the commands you're running so that I can reproduce the problem here?

I'll send you an email

@charleskorn
Copy link
Collaborator

Thanks!

@charleskorn charleskorn changed the title Inputs on cli get printed twice when sshed onto a container started by batect Inputs on CLI get printed twice Nov 19, 2018
@charleskorn
Copy link
Collaborator

Further offline discussion has revealed that SSH is not involved (this happens when running ./batect the-task)

I can't reproduce this issue at the moment and @minnn-minnn is going to try to isolate the problem so I can reproduce it.

@ineffyble
Copy link
Contributor

I'm now working with @minnn-minnn and have worked out that this bug was introduced in 0.22.0. Previous versions work fine. Hope this helps narrow the problem down.

@charleskorn
Copy link
Collaborator

Alright, that tells me where the problem is but I don't understand why it's happening. Does this affect all containers you run, or just this one? (I can't reproduce the problem locally at the moment, so I need some help to narrow it down so that I can.)

@charleskorn
Copy link
Collaborator

Further details from @minnn-minnn:

Centos Linux 7 - kernel: linux 3.10.0 x86_64
Bash - 4.4.19

@charleskorn
Copy link
Collaborator

I can now reproduce this problem! Thanks for your help @minnn-minnn and @ineffyble. I'll take a look and see what the fix is.

charleskorn added a commit that referenced this issue Nov 30, 2018
).

This only affected certain Linux distos where 'stty raw' does not
disable input echoing.

We now explicitly set the exact TTY mode we want (which is based on what
the Docker CLI does).
@charleskorn
Copy link
Collaborator

Resolved with 6b593a8.

Thanks for your help and patience @minnn-minnn and @ineffyble!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants