diff --git a/src/main/kotlin/com/beust/kobalt/app/UpdateKobalt.kt b/src/main/kotlin/com/beust/kobalt/app/UpdateKobalt.kt index 3b74e15b..ca9548ea 100644 --- a/src/main/kotlin/com/beust/kobalt/app/UpdateKobalt.kt +++ b/src/main/kotlin/com/beust/kobalt/app/UpdateKobalt.kt @@ -35,7 +35,9 @@ class UpdateKobalt @Inject constructor(val github: GithubApi2, val wrapperProper * Accepts Future as `latestVersionFuture` to allow getting `latestVersion` in the background. */ fun checkForNewVersion(latestVersionFuture: Future) { - if (Kobalt.versionCheckTimeout > Duration.between(VersionCheckTimestampFile.timestamp, Instant.now())) { + // Only check once a day, except if autoUpdate is true + if (Kobalt.versionCheckTimeout > Duration.between(VersionCheckTimestampFile.timestamp, Instant.now()) + && ! settings.autoUpdate) { return // waits `Kobalt.versionCheckTimeout` before the next check }