cmd: fix --progress crash under Windows Jenkins - fixes #2846

This commit is contained in:
Nick Craig-Wood
2018-12-19 12:36:29 +00:00
parent df1faa9a8f
commit 9012d7c6c1
3 changed files with 25 additions and 7 deletions

View File

@@ -27,6 +27,11 @@ const (
//
// It returns a func which should be called to stop the stats.
func startProgress() func() {
err := initTerminal()
if err != nil {
fs.Errorf(nil, "Failed to start progress: %v", err)
return func() {}
}
stopStats := make(chan struct{})
oldLogPrint := fs.LogPrint
if !log.Redirected() {