Skip to content

Commit

Permalink
Add @jvmoverloads to process function (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgreze authored Dec 16, 2022
1 parent 5fa667d commit 3f0fb93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/kotlin/com/github/pgreze/process/Process.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ private suspend fun <R> coroutineScopeIO(block: suspend CoroutineScope.() -> R)
}

@Suppress("BlockingMethodInNonBlockingContext", "LongParameterList", "ComplexMethod")
@JvmOverloads
suspend fun process(
vararg command: String,
stdin: InputSource? = null,
Expand Down Expand Up @@ -71,8 +72,10 @@ suspend fun process(
when {
captureAll || stdout == Redirect.CAPTURE ->
process.inputStream

stderr == Redirect.CAPTURE ->
process.errorStream

else -> null
}?.lineFlow(charset) { f ->
f.map {
Expand Down

0 comments on commit 3f0fb93

Please sign in to comment.