automatically enable quiet-mode if terminal capabilities are limited

This commit is contained in:
Anand Babu (AB) Periasamy
2015-08-29 12:25:03 -07:00
parent 29389323c0
commit 0fbcfa5de0
+5
View File
@@ -29,6 +29,7 @@ import (
"github.com/minio/mc/pkg/console"
"github.com/minio/minio/pkg/probe"
"github.com/minio/pb"
"github.com/olekukonko/ts"
)
// Check for the environment early on and gracefully report.
@@ -162,6 +163,10 @@ func main() {
app.Before = registerBefore
app.ExtraInfo = func() map[string]string {
if _, e := ts.GetSize(); e != nil {
globalQuietFlag = true
}
if globalDebugFlag {
return getSystemData()
}