From c588a8a24d5f1d0609b536272de3484434919cbd Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 27 Feb 2019 16:52:55 +0100 Subject: [PATCH] Revert "cheggaaa.pb: try to not open tty at init to see if it causes #7299" This reverts commit 4e55278839a44da5057903d69f50dd6ab2862566. --- vendor/github.com/cheggaaa/pb/pb_x.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/vendor/github.com/cheggaaa/pb/pb_x.go b/vendor/github.com/cheggaaa/pb/pb_x.go index 493854af4..398345080 100644 --- a/vendor/github.com/cheggaaa/pb/pb_x.go +++ b/vendor/github.com/cheggaaa/pb/pb_x.go @@ -24,16 +24,16 @@ var ( ) func init() { - // echoLockMutex.Lock() - // defer echoLockMutex.Unlock() - - // var err error - // tty, err = os.Open("/dev/tty") - // istty = true - // if err != nil { - // tty = os.Stdin - // istty = false - // } + echoLockMutex.Lock() + defer echoLockMutex.Unlock() + + var err error + tty, err = os.Open("/dev/tty") + istty = true + if err != nil { + tty = os.Stdin + istty = false + } } // terminalWidth returns width of the terminal.