1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 16:07:12 -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.
*/
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")