File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ yq -P -oy sample.json
71
71
level := logging .WARNING
72
72
stringFormat := `[%{level}] %{color}%{time:15:04:05}%{color:reset} %{message}`
73
73
74
+ // when NO_COLOR environment variable presents and not an empty string the coloured output should be disabled;
75
+ // refer to no-color.org
76
+ forceNoColor = forceNoColor || os .Getenv ("NO_COLOR" ) != ""
77
+
74
78
if verbose && forceNoColor {
75
79
level = logging .DEBUG
76
80
stringFormat = `[%{level:5.5s}] %{time:15:04:05} %{shortfile:-33s} %{shortfunc:-25s} %{message}`
@@ -90,10 +94,6 @@ yq -P -oy sample.json
90
94
logging .SetBackend (backend )
91
95
yqlib .InitExpressionParser ()
92
96
93
- // when NO_COLOR environment variable presents and not an empty string the coloured output should be disabled;
94
- // refer to no-color.org
95
- forceNoColor = os .Getenv ("NO_COLOR" ) != ""
96
-
97
97
return nil
98
98
},
99
99
}
You can’t perform that action at this time.
0 commit comments