mirror of
https://github.com/containrrr/watchtower.git
synced 2025-03-03 15:32:37 +02:00
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 <simme@arcticbit.se>
This commit is contained in:
parent
03a929df80
commit
966972b072
@ -102,6 +102,10 @@ func PreRun(cmd *cobra.Command, args []string) {
|
|||||||
reviveStopped, _ := f.GetBool("revive-stopped")
|
reviveStopped, _ := f.GetBool("revive-stopped")
|
||||||
removeVolumes, _ := f.GetBool("remove-volumes")
|
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(
|
client = container.NewClient(
|
||||||
!noPull,
|
!noPull,
|
||||||
includeStopped,
|
includeStopped,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user