Skip to content

Commit dc01b98

Browse files
authored
Merge pull request docker#10559 from ndeloof/COMPOSE_ANSI
introduce COMPOSE_ANSI to define --ansi default value
2 parents 312f0d1 + fca454b commit dc01b98

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)