File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 8
8
"github.com/mgutz/ansi"
9
9
"github.com/spf13/cobra"
10
10
"golang.org/x/term"
11
+ "github.com/gonvenience/bunt"
11
12
)
12
13
13
14
const rootCmdLongUsage = `
@@ -61,15 +62,19 @@ func New() *cobra.Command {
61
62
}
62
63
}
63
64
65
+ // Dyff relies on bunt, default to color=on
66
+ bunt .SetColorSettings (bunt .ON , bunt .ON )
64
67
nc , _ := cmd .Flags ().GetBool ("no-color" )
65
68
66
69
if nc || (fc != nil && ! * fc ) {
67
70
ansi .DisableColors (true )
71
+ bunt .SetColorSettings (bunt .OFF , bunt .OFF )
68
72
} else if ! cmd .Flags ().Changed ("no-color" ) && fc == nil {
69
73
term := term .IsTerminal (int (os .Stdout .Fd ()))
70
74
// https://github.com/databus23/helm-diff/issues/281
71
75
dumb := os .Getenv ("TERM" ) == "dumb"
72
76
ansi .DisableColors (! term || dumb )
77
+ bunt .SetColorSettings (bunt .OFF , bunt .OFF )
73
78
}
74
79
},
75
80
RunE : func (cmd * cobra.Command , args []string ) error {
You can’t perform that action at this time.
0 commit comments