From 966972b0722948b5245e7f77a0937f9696e770f2 Mon Sep 17 00:00:00 2001 From: MihailITPlace Date: Sat, 8 Aug 2020 20:43:01 +0400 Subject: [PATCH] Warning if `WATCHTOWER_NO_PULL` and` WATCHTOWER_MONITOR_ONLY` are used simultaneously. (#594) * A warning was added if `WATCHTOWER_NO_PULL` and` WATCHTOWER_MONITOR_ONLY` are used simultaneously * Update root.go Co-authored-by: Simon Aronsson --- cmd/root.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index bef694c..d4839e6 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -102,6 +102,10 @@ func PreRun(cmd *cobra.Command, args []string) { reviveStopped, _ := f.GetBool("revive-stopped") removeVolumes, _ := f.GetBool("remove-volumes") + if monitorOnly && noPull { + log.Warn("Using `WATCHTOWER_NO_PULL` and `WATCHTOWER_MONITOR_ONLY` simultaneously might lead to no action being taken at all. If this is intentional, you may safely ignore this message.") + } + client = container.NewClient( !noPull, includeStopped,