1
0
mirror of https://github.com/containrrr/watchtower.git synced 2024-12-12 09:04:17 +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:
MihailITPlace 2020-08-08 20:43:01 +04:00 committed by GitHub
parent 03a929df80
commit 966972b072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,