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 88 "github.com/mgutz/ansi"
99 "github.com/spf13/cobra"
1010 "golang.org/x/term"
11+ "github.com/gonvenience/bunt"
1112)
1213
1314const rootCmdLongUsage = `
@@ -61,15 +62,19 @@ func New() *cobra.Command {
6162 }
6263 }
6364
65+ // Dyff relies on bunt, default to color=on
66+ bunt .SetColorSettings (bunt .ON , bunt .ON )
6467 nc , _ := cmd .Flags ().GetBool ("no-color" )
6568
6669 if nc || (fc != nil && ! * fc ) {
6770 ansi .DisableColors (true )
71+ bunt .SetColorSettings (bunt .OFF , bunt .OFF )
6872 } else if ! cmd .Flags ().Changed ("no-color" ) && fc == nil {
6973 term := term .IsTerminal (int (os .Stdout .Fd ()))
7074 // https://github.com/databus23/helm-diff/issues/281
7175 dumb := os .Getenv ("TERM" ) == "dumb"
7276 ansi .DisableColors (! term || dumb )
77+ bunt .SetColorSettings (bunt .OFF , bunt .OFF )
7378 }
7479 },
7580 RunE : func (cmd * cobra.Command , args []string ) error {
You can’t perform that action at this time.
0 commit comments