Skip to content

Commit

Permalink
remove stdIn from execute(_)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkurnikov committed Nov 10, 2024
1 parent 11fbc3d commit f60ec3d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ data class Aptos(val cliLocation: Path, val parentDisposable: Disposable?): Disp
): RsProcessResult<ProcessOutput> {
return commandLine
.toGeneralCommandLine(this.cliLocation)
.execute(innerDisposable, stdIn = null, listener = listener, runner = runner)
.execute(innerDisposable, listener = listener, runner = runner)
}

override fun dispose() {}
Expand Down
4 changes: 0 additions & 4 deletions src/main/kotlin/org/move/openapiext/CommandLineExt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ fun GeneralCommandLine.execute(): ProcessOutput? {
/// `owner` parameter represents the object whose lifetime it's using for the process lifetime
fun GeneralCommandLine.execute(
owner: CheckedDisposable,
stdIn: ByteArray? = null,
runner: CapturingProcessHandler.() -> ProcessOutput = { runProcessWithGlobalProgress() },
listener: ProcessListener? = null
): RsProcessResult<ProcessOutput> {
Expand Down Expand Up @@ -84,9 +83,6 @@ fun GeneralCommandLine.execute(
listener?.let { processHandler.addProcessListener(it) }

val output = try {
if (stdIn != null) {
processHandler.processInput.use { it.write(stdIn) }
}
// execution happens here
processHandler.runner()
} finally {
Expand Down

0 comments on commit f60ec3d

Please sign in to comment.