mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Don't display an update is available if it's been downloaded.
This commit is contained in:
parent
d74a68e31f
commit
8335a3c06b
1 changed files with 8 additions and 3 deletions
|
@ -116,10 +116,15 @@ private class Main @Inject constructor(
|
|||
val latestVersionString = latestVersionFuture.get(1, TimeUnit.SECONDS)
|
||||
val latestVersion = Versions.toLongVersion(latestVersionString)
|
||||
val current = Versions.toLongVersion(Kobalt.version)
|
||||
val distFile = File(KFiles.joinDir(KFiles.distributionsDir, latestVersionString))
|
||||
if (latestVersion > current) {
|
||||
listOf("", "New Kobalt version available: $latestVersionString",
|
||||
"To update, run ./kobaltw --update", "").forEach {
|
||||
log(1, "**** $it")
|
||||
if (distFile.exists()) {
|
||||
log(1, "**** Version $latestVersionString is installed")
|
||||
} else {
|
||||
listOf("", "New Kobalt version available: $latestVersionString",
|
||||
"To update, run ./kobaltw --update", "").forEach {
|
||||
log(1, "**** $it")
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch(ex: TimeoutException) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue