diff --git a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/NewRunCommand.kt b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/NewRunCommand.kt index a41f27d0..e105133b 100644 --- a/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/NewRunCommand.kt +++ b/modules/kobalt-plugin-api/src/main/kotlin/com/beust/kobalt/misc/NewRunCommand.kt @@ -79,7 +79,11 @@ open class NewRunCommand(val info: RunCommandInfo) { val process = pb.start() // Run the command and collect the return code and streams - val returnCode = process.waitFor(60, TimeUnit.SECONDS) + val processFinished = process.waitFor(120, TimeUnit.SECONDS) + + if (!processFinished) + kobaltError("process timed out!") + val input = if (process.inputStream.available() > 0) fromStream(process.inputStream) else listOf() @@ -92,10 +96,9 @@ open class NewRunCommand(val info: RunCommandInfo) { // Check to see if the command succeeded val isSuccess = if (info.containsErrors != null) ! info.containsErrors!!(error) - else isSuccess(if (info.ignoreExitValue) true else returnCode, input, error) + else isSuccess(if (info.ignoreExitValue) true else processFinished, input, error) if (isSuccess) { - kobaltLog(3, "success so far") if (!info.useErrorStreamAsErrorIndicator) { info.successCallback(error + input) } else {