Skip to content

Commit b5c7d88

Browse files
committed
Consider last line only when probing for command
This ignores any user-defined output in an interactive shell that might precede the output of the command.
1 parent 07e5292 commit b5c7d88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

p5js/src/main/kotlin/p5jsEditor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class p5jsEditor(base: Base, path: String?, state: EditorState?, mode: Mode?) :
103103
throw RuntimeException("Command failed with non-zero exit code $exitCode.")
104104
}
105105

106-
val output = process.inputStream.bufferedReader().use { it.readText() }
106+
val output = process.inputStream.bufferedReader().use { it.readLines().last() }
107107
return output
108108
}
109109

0 commit comments

Comments
 (0)