Skip to content

Commit

Permalink
feat: disable colored log output when running in ci (#70)
Browse files Browse the repository at this point in the history
Signed-off-by: nscuro <[email protected]>

Closes #69
  • Loading branch information
nscuro authored Sep 23, 2021
1 parent 2376415 commit 70ea280
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/cli/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ func AddStdComponent(bom *cdx.BOM) error {
}

func ConfigureLogger(logOptions options.LogOptions) {
log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr})
log.Logger = log.Output(zerolog.ConsoleWriter{
Out: os.Stderr,
NoColor: os.Getenv("CI") != "",
})

if logOptions.Verbose {
zerolog.SetGlobalLevel(zerolog.DebugLevel)
Expand Down

0 comments on commit 70ea280

Please sign in to comment.