Skip to content

Commit 89f3fac

Browse files
committed
Also read output from normal commands
1 parent 85790bd commit 89f3fac

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

p5js/src/main/kotlin/p5jsEditor.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,12 @@ class p5jsEditor(base: Base, path: String?, state: EditorState?, mode: Mode?) :
341341
try {
342342
val processBuilder = builder(action, directory)
343343
val process = processBuilder.start()
344+
val reader = BufferedReader(InputStreamReader(process.inputStream))
345+
var line: String?
346+
347+
while (reader.readLine().also { line = it } != null) {
348+
println(line)
349+
}
344350
// suspend fun to wait for process to finish
345351
val exitCode = process.waitFor()
346352

0 commit comments

Comments
 (0)