From 5f896dc03ee68fac13f8d4fee40c86bc58cf7505 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Tue, 18 Apr 2017 17:52:36 -0700 Subject: [PATCH] Fix for new TaskResult signature. --- .../thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt index 2c9fb06..94eb440 100644 --- a/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt +++ b/src/main/kotlin/net/thauvin/erik/kobalt/plugin/exec/ExecPlugin.kt @@ -39,10 +39,7 @@ import com.beust.kobalt.api.annotation.Task import com.beust.kobalt.misc.log import com.google.inject.Inject import com.google.inject.Singleton -import java.io.BufferedReader -import java.io.File -import java.io.InputStream -import java.io.InputStreamReader +import java.io.* import java.util.* import java.util.concurrent.TimeUnit @@ -63,11 +60,11 @@ class ExecPlugin @Inject constructor(val configActor: ConfigActor) : @Suppress("unused") @Task(name = "exec", description = "Execute a command line process.") fun taskExec(project: Project): TaskResult { - var result = TaskResult() configurationFor(project)?.let { config -> - result = executeCommands(project, config) + return executeCommands(project, config) } - return result + + return TaskResult() } private fun matchOs(os: Os): Boolean { @@ -155,10 +152,10 @@ class ExecPlugin @Inject constructor(val configActor: ConfigActor) : if (!success) break } - //@TODO until cedric fixes it. + //@TODO until Cedric fixes it. if (!success) error(errorMessage) - return TaskResult(success, errorMessage.toString()) + return TaskResult(success) } private fun fromStream(ins: InputStream): List {