mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -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 latestVersionString = latestVersionFuture.get(1, TimeUnit.SECONDS)
|
||||||
val latestVersion = Versions.toLongVersion(latestVersionString)
|
val latestVersion = Versions.toLongVersion(latestVersionString)
|
||||||
val current = Versions.toLongVersion(Kobalt.version)
|
val current = Versions.toLongVersion(Kobalt.version)
|
||||||
|
val distFile = File(KFiles.joinDir(KFiles.distributionsDir, latestVersionString))
|
||||||
if (latestVersion > current) {
|
if (latestVersion > current) {
|
||||||
listOf("", "New Kobalt version available: $latestVersionString",
|
if (distFile.exists()) {
|
||||||
"To update, run ./kobaltw --update", "").forEach {
|
log(1, "**** Version $latestVersionString is installed")
|
||||||
log(1, "**** $it")
|
} else {
|
||||||
|
listOf("", "New Kobalt version available: $latestVersionString",
|
||||||
|
"To update, run ./kobaltw --update", "").forEach {
|
||||||
|
log(1, "**** $it")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch(ex: TimeoutException) {
|
} catch(ex: TimeoutException) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue