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>
pull/614/head
MihailITPlace 4 years ago committed by GitHub
parent 03a929df80
commit 966972b072
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save