diff --git a/cmd/compose/compose.go b/cmd/compose/compose.go index d711b23d1..bf30975c0 100644 --- a/cmd/compose/compose.go +++ b/cmd/compose/compose.go @@ -306,6 +306,10 @@ func RootCommand(streams command.Cli, backend api.Service) *cobra.Command { //no logrus.SetLevel(logrus.TraceLevel) } + if v, ok := os.LookupEnv("COMPOSE_ANSI"); ok && !cmd.Flags().Changed("ansi") { + ansi = v + } + formatter.SetANSIMode(streams, ansi) if noColor, ok := os.LookupEnv("NO_COLOR"); ok && noColor != "" {