From c3c43613a8dcbfa0174fba5e636eb37ee750d44d Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Thu, 30 Mar 2017 10:40:47 -0700 Subject: [PATCH] Fix the silly cycle. --- src/main/kotlin/com/beust/kobalt/app/UpdateKobalt.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/app/UpdateKobalt.kt b/src/main/kotlin/com/beust/kobalt/app/UpdateKobalt.kt index dbe43523..3b74e15b 100644 --- a/src/main/kotlin/com/beust/kobalt/app/UpdateKobalt.kt +++ b/src/main/kotlin/com/beust/kobalt/app/UpdateKobalt.kt @@ -16,7 +16,7 @@ import javax.inject.Inject * Update Kobalt to the latest version. */ class UpdateKobalt @Inject constructor(val github: GithubApi2, val wrapperProperties: KobaltWrapperProperties, - val settings: KobaltSettings, val updateKobalt: UpdateKobalt) { + val settings: KobaltSettings) { fun updateKobalt() { val newVersion = github.latestKobaltVersion wrapperProperties.create(newVersion.get()) @@ -47,7 +47,7 @@ class UpdateKobalt @Inject constructor(val github: GithubApi2, val wrapperProper if (latestVersion > current) { if (settings.autoUpdate) { kobaltLog(1, "**** Automatically updating to $latestVersionString") - updateKobalt.updateKobalt() + updateKobalt() } else if (distFile.exists()) { kobaltLog(1, "**** Version $latestVersionString is installed, you can switch to it with " + "./kobaltw --update")