mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
fix: remove unnecessary cronSet check
resolves issue 343
This commit is contained in:
parent
b4846ef158
commit
9eca883f17
1 changed files with 2 additions and 3 deletions
|
@ -65,13 +65,12 @@ func PreRun(cmd *cobra.Command, args []string) {
|
|||
}
|
||||
|
||||
pollingSet := f.Changed("interval")
|
||||
cronSet := f.Changed("schedule")
|
||||
schedule, _ := f.GetString("schedule")
|
||||
cronLen := len(schedule)
|
||||
|
||||
if pollingSet && cronSet && cronLen > 0 {
|
||||
if pollingSet && cronLen > 0 {
|
||||
log.Fatal("Only schedule or interval can be defined, not both.")
|
||||
} else if cronSet && cronLen > 0 {
|
||||
} else if cronLen > 0 {
|
||||
scheduleSpec, _ = f.GetString("schedule")
|
||||
} else {
|
||||
interval, _ := f.GetInt("interval")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue