Skip to content

Commit

Permalink
Allow 0 value to disable ScanSchedule.
Browse files Browse the repository at this point in the history
Seems that Viper does not recognize empty environment vars as valid values

Closes #1274
  • Loading branch information
deluan committed Aug 3, 2021
1 parent e9d0abe commit b44ef81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conf/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func validateScanSchedule() error {
log.Warn("Setting ScanSchedule", "schedule", Server.ScanSchedule)
}
}
if Server.ScanSchedule == "" {
if Server.ScanSchedule == "0" || Server.ScanSchedule == "" {
return nil
}
if _, err := time.ParseDuration(Server.ScanSchedule); err == nil {
Expand Down

0 comments on commit b44ef81

Please sign in to comment.