Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De Loof 2023-03-03 10:44:10 +01:00 committed by Nicolas De loof
parent c4b47fe911
commit 9cc1613b55
1 changed files with 5 additions and 0 deletions

View File

@ -304,6 +304,11 @@ func RootCommand(streams command.Cli, backend api.Service) *cobra.Command { //no
if verbose {
logrus.SetLevel(logrus.TraceLevel)
}
if noColor, ok := os.LookupEnv("NO_COLOR"); ok && noColor != "" && !cmd.Flags().Changed("ansi") {
ansi = "never"
}
formatter.SetANSIMode(streams, ansi)
switch ansi {
case "never":