From 3539e67c1a6bc34dd712d107092a4c5134484760 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 19 Oct 2015 20:23:50 -0700 Subject: [PATCH] Correct Kobalt jar file detection. --- src/main/kotlin/com/beust/kobalt/misc/KFiles.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/misc/KFiles.kt b/src/main/kotlin/com/beust/kobalt/misc/KFiles.kt index 49d4d077..417a9db3 100644 --- a/src/main/kotlin/com/beust/kobalt/misc/KFiles.kt +++ b/src/main/kotlin/com/beust/kobalt/misc/KFiles.kt @@ -20,12 +20,12 @@ public class KFiles { } else { val jar = joinDir(distributionsDir, Kobalt.version, "kobalt/wrapper/kobalt-" + Kobalt.version + ".jar") val jarFile = File(jar) - if (! jarFile.exists()) { + if (jarFile.exists()) { return jarFile.absolutePath } else { // Will only happen when building kobalt itself: the jar file might not be in the dist/ directory // yet since we're currently building it. Instead, use the classes directly - debug("Couldn't find a kobalt.jar file, using build/classes/main") + debug("Couldn't find ${jarFile.absolutePath}, using build/classes/main") return java.io.File(joinDir("build", "classes", "main")).absolutePath } }