File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
1
package cmd
2
2
3
- import "os"
4
-
5
3
var unwrapScalarFlag = newUnwrapFlag ()
6
4
7
5
var unwrapScalar = false
@@ -26,12 +24,6 @@ var forceColor = false
26
24
var forceNoColor = false
27
25
var colorsEnabled = false
28
26
29
- func init () {
30
- // when NO_COLOR environment variable presents and not an empty string the coloured output should be disabled;
31
- // refer to no-color.org
32
- forceNoColor = os .Getenv ("NO_COLOR" ) != ""
33
- }
34
-
35
27
// can be either "" (off), "extract" or "process"
36
28
var frontMatter = ""
37
29
Original file line number Diff line number Diff line change @@ -90,6 +90,10 @@ yq -P -oy sample.json
90
90
logging .SetBackend (backend )
91
91
yqlib .InitExpressionParser ()
92
92
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
+
93
97
return nil
94
98
},
95
99
}
You can’t perform that action at this time.
0 commit comments