1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 00:38:11 -07:00

Fix the silly cycle.

This commit is contained in:
Cedric Beust 2017-03-30 10:40:47 -07:00
parent d712a14405
commit c3c43613a8

View file

@ -16,7 +16,7 @@ import javax.inject.Inject
* Update Kobalt to the latest version. * Update Kobalt to the latest version.
*/ */
class UpdateKobalt @Inject constructor(val github: GithubApi2, val wrapperProperties: KobaltWrapperProperties, class UpdateKobalt @Inject constructor(val github: GithubApi2, val wrapperProperties: KobaltWrapperProperties,
val settings: KobaltSettings, val updateKobalt: UpdateKobalt) { val settings: KobaltSettings) {
fun updateKobalt() { fun updateKobalt() {
val newVersion = github.latestKobaltVersion val newVersion = github.latestKobaltVersion
wrapperProperties.create(newVersion.get()) wrapperProperties.create(newVersion.get())
@ -47,7 +47,7 @@ class UpdateKobalt @Inject constructor(val github: GithubApi2, val wrapperProper
if (latestVersion > current) { if (latestVersion > current) {
if (settings.autoUpdate) { if (settings.autoUpdate) {
kobaltLog(1, "**** Automatically updating to $latestVersionString") kobaltLog(1, "**** Automatically updating to $latestVersionString")
updateKobalt.updateKobalt() updateKobalt()
} else if (distFile.exists()) { } else if (distFile.exists()) {
kobaltLog(1, "**** Version $latestVersionString is installed, you can switch to it with " + kobaltLog(1, "**** Version $latestVersionString is installed, you can switch to it with " +
"./kobaltw --update") "./kobaltw --update")