fix factorio running check again??
This commit is contained in:
parent
b4ba87e8e0
commit
d79a30b1ec
2 changed files with 9 additions and 9 deletions
|
|
@ -9,15 +9,11 @@ import org.gradle.process.ExecOperations
|
|||
|
||||
/** Checks if a process is running. Windows only. */
|
||||
class ProcessRunningSpec(
|
||||
private val executor: ExecOperations,
|
||||
private val process: String,
|
||||
private val ignoreCase: Boolean = true,
|
||||
) : ExplainingSpec<Task> {
|
||||
|
||||
@Inject
|
||||
fun executor(): ExecOperations {
|
||||
throw UnsupportedOperationException()
|
||||
}
|
||||
|
||||
override fun isSatisfiedBy(element: Task?): Boolean = whyUnsatisfied(element) == null
|
||||
|
||||
override fun whyUnsatisfied(element: Task?): String? {
|
||||
|
|
@ -27,7 +23,7 @@ class ProcessRunningSpec(
|
|||
else -> {
|
||||
return ByteArrayOutputStream().use { outputStream ->
|
||||
|
||||
executor().exec {
|
||||
executor.exec {
|
||||
commandLine("tasklist") // Windows only for now...
|
||||
standardOutput = outputStream
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue