terminal.IsTerminal() is not available on FreeBSD until go1.3

This commit is contained in:
Andrey Smirnov
2014-02-10 22:48:12 +04:00
parent 1bba0319cb
commit 766d634fbb
3 changed files with 20 additions and 3 deletions
+1 -3
View File
@@ -1,10 +1,8 @@
package utils
import (
"code.google.com/p/go.crypto/ssh/terminal"
"fmt"
"github.com/cheggaaa/pb"
"syscall"
)
const (
@@ -54,7 +52,7 @@ func (p *Progress) InitBar(count int64, isBytes bool) {
if p.bar != nil {
panic("bar already initialized")
}
if terminal.IsTerminal(syscall.Stdout) {
if RunningOnTerminal() {
p.bar = pb.New(0)
p.bar.Total = count
p.bar.NotPrint = true