From f13d8387d3cd62db2a91c7e2b5090df2d46fbd52 Mon Sep 17 00:00:00 2001 From: Ben Paxton Date: Wed, 13 Mar 2019 17:24:36 +0000 Subject: [PATCH] fix help generation; update README --- README.md | 1 + pkg/commands/executor.go | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index eb0a67f7..dfd1c9ce 100644 --- a/README.md +++ b/README.md @@ -503,6 +503,7 @@ Flags: -h, --help help for run Global Flags: + --color string Use color when printing; can be 'always', 'auto', or 'never' (default "auto") -j, --concurrency int Concurrency (default NumCPU) (default 8) --cpu-profile-path string Path to CPU profile output file --mem-profile-path string Path to memory profile output file diff --git a/pkg/commands/executor.go b/pkg/commands/executor.go index fe09f10d..0169aaa5 100644 --- a/pkg/commands/executor.go +++ b/pkg/commands/executor.go @@ -52,17 +52,17 @@ func NewExecutor(version, commit, date string) *Executor { } if commandLineCfg != nil { logutils.SetupVerboseLog(e.log, commandLineCfg.Run.IsVerbose) - } - switch commandLineCfg.Output.Color { - case "always": - color.NoColor = false - case "never": - color.NoColor = true - case "auto": - // nothing - default: - e.log.Fatalf("invalid value %q for --color; must be 'always', 'auto', or 'never'", commandLineCfg.Output.Color) + switch commandLineCfg.Output.Color { + case "always": + color.NoColor = false + case "never": + color.NoColor = true + case "auto": + // nothing + default: + e.log.Fatalf("invalid value %q for --color; must be 'always', 'auto', or 'never'", commandLineCfg.Output.Color) + } } // init of commands must be done before config file reading because