Hangs without TTY
codekoala opened this issue · comments
I'm trying to use machma to speed up some operations in build scripts, but it always seems to hang without a TTY (which is the case when my build scripts normally run). I have reproduced this behavior inside of a docker container simply by including or omitting the -t
flag.
This will hang:
$ docker run --rm golang:1.9 /bin/bash -c 'go get -u github.com/fd0/machma ; find /go -iname "*.go" | machma -- md5sum {}'
But this will not hang:
$ docker run -t --rm golang:1.9 /bin/bash -c 'go get -u github.com/fd0/machma ; find /go -iname "*.go" | machma -- md5sum {}'
The only difference in the commands is the -t
flag.
I just used a version of machma
built using fd0/termstatus#2 through my build pipeline and verified the hanging problem did not happen.
Nice, thank you very much for the report/analysis and the fix! You can easily reproduce it by piping machma
to cat
:
$ find . -type f | machma -- md5sum {} | cat
Great, thank you!
cat
is much easier than the docker
incantation. 👍