Skip to content

Commit fca454b

Browse files
committed
introduce COMPOSE_ANSI to define --ansi default value
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 77dc9b5 commit fca454b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/compose/compose.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ func RootCommand(streams command.Cli, backend api.Service) *cobra.Command { //no
306306
logrus.SetLevel(logrus.TraceLevel)
307307
}
308308

309+
if v, ok := os.LookupEnv("COMPOSE_ANSI"); ok && !cmd.Flags().Changed("ansi") {
310+
ansi = v
311+
}
312+
309313
formatter.SetANSIMode(streams, ansi)
310314

311315
if noColor, ok := os.LookupEnv("NO_COLOR"); ok && noColor != "" {

0 commit comments

Comments
 (0)