mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 00:17:11 -07:00
Added ignoreInputStream, ignoreErrorStream and ignoreExitvalue to the application plugin.
This commit is contained in:
parent
be40f5c81d
commit
20a01f8de0
2 changed files with 20 additions and 4 deletions
|
@ -17,7 +17,6 @@ import com.beust.kobalt.plugin.packaging.PackageConfig
|
|||
import com.beust.kobalt.plugin.packaging.PackagingPlugin
|
||||
import com.google.inject.Inject
|
||||
import com.google.inject.Singleton
|
||||
import org.jetbrains.kotlin.config.TargetPlatformVersion.NoVersion.description
|
||||
import java.io.File
|
||||
|
||||
class ApplicationConfig {
|
||||
|
@ -34,6 +33,15 @@ class ApplicationConfig {
|
|||
@Directive
|
||||
fun args(vararg argv: String) = argv.forEach { args.add(it) }
|
||||
val args = arrayListOf<String>()
|
||||
|
||||
@Directive
|
||||
var ignoreErrorStream: Boolean = false
|
||||
|
||||
@Directive
|
||||
var ignoreInputStream: Boolean = true
|
||||
|
||||
@Directive
|
||||
var ignoreExitValue: Boolean = false
|
||||
}
|
||||
|
||||
@Directive
|
||||
|
@ -147,6 +155,9 @@ class ApplicationPlugin @Inject constructor(val configActor: ConfigsActor<Applic
|
|||
kobaltLog(1, "ERROR")
|
||||
kobaltLog(1, output.joinToString("\n"))
|
||||
}
|
||||
useErrorStreamAsErrorIndicator = !config.ignoreErrorStream
|
||||
useInputStreamAsErrorIndicator = !config.ignoreInputStream
|
||||
ignoreExitValue = config.ignoreExitValue
|
||||
}
|
||||
return TaskResult(exitCode == 0)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue