mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
extend timeout, add logging
This commit is contained in:
parent
3475377185
commit
42bd2ecdf1
1 changed files with 4 additions and 1 deletions
|
@ -79,7 +79,7 @@ open class NewRunCommand(val info: RunCommandInfo) {
|
||||||
val process = pb.start()
|
val process = pb.start()
|
||||||
|
|
||||||
// Run the command and collect the return code and streams
|
// Run the command and collect the return code and streams
|
||||||
val returnCode = process.waitFor(30, TimeUnit.SECONDS)
|
val returnCode = process.waitFor(60, TimeUnit.SECONDS)
|
||||||
val input =
|
val input =
|
||||||
if (process.inputStream.available() > 0) fromStream(process.inputStream)
|
if (process.inputStream.available() > 0) fromStream(process.inputStream)
|
||||||
else listOf()
|
else listOf()
|
||||||
|
@ -87,12 +87,15 @@ open class NewRunCommand(val info: RunCommandInfo) {
|
||||||
if (process.errorStream.available() > 0) fromStream(process.errorStream)
|
if (process.errorStream.available() > 0) fromStream(process.errorStream)
|
||||||
else listOf()
|
else listOf()
|
||||||
|
|
||||||
|
kobaltLog(3, "info contains errors: " + (info.containsErrors != null))
|
||||||
|
|
||||||
// Check to see if the command succeeded
|
// Check to see if the command succeeded
|
||||||
val isSuccess =
|
val isSuccess =
|
||||||
if (info.containsErrors != null) ! info.containsErrors!!(error)
|
if (info.containsErrors != null) ! info.containsErrors!!(error)
|
||||||
else isSuccess(if (info.ignoreExitValue) true else returnCode, input, error)
|
else isSuccess(if (info.ignoreExitValue) true else returnCode, input, error)
|
||||||
|
|
||||||
if (isSuccess) {
|
if (isSuccess) {
|
||||||
|
kobaltLog(3, "success so far")
|
||||||
if (!info.useErrorStreamAsErrorIndicator) {
|
if (!info.useErrorStreamAsErrorIndicator) {
|
||||||
info.successCallback(error + input)
|
info.successCallback(error + input)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue