mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
Disabling color through environment variables (#598)
* This patch adds support for disabling color through environment variables.
- NO_COLOR: https://no-color.org/
- CLICOLOR,CLICOLOR_FORCE: https://bixense.com/clicolors/ ( [logrus built-in](6699a89a23/text_formatter.go (L46)
) )
* use viper/cobra and add documentation. (https://github.com/containrrr/watchtower/pull/598#pullrequestreview-463814669)
Co-authored-by: Simon Aronsson <simme@arcticbit.se>
This commit is contained in:
parent
9bd3913a11
commit
158b6935d4
3 changed files with 39 additions and 13 deletions
|
@ -140,7 +140,12 @@ func RegisterSystemFlags(rootCmd *cobra.Command) {
|
|||
"",
|
||||
viper.GetString("WATCHTOWER_HTTP_API_TOKEN"),
|
||||
"Sets an authentication token to HTTP API requests.")
|
||||
|
||||
// https://no-color.org/
|
||||
flags.BoolP(
|
||||
"no-color",
|
||||
"",
|
||||
viper.IsSet("NO_COLOR"),
|
||||
"Disable ANSI color escape codes in log output")
|
||||
flags.StringP(
|
||||
"scope",
|
||||
"",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue