Fix error

This commit is contained in:
Mygod
2020-06-21 06:09:34 +08:00
parent 2ebe0e4962
commit 72d79ed822

View File

@@ -92,6 +92,7 @@ class RootServer @JvmOverloads constructor(private val warnLogger: (String) -> U
* It is advised to read this after initializing the instance.
*/
fun readUnexpectedStderr(): String? {
if (!this::process.isInitialized) return null
var available = process.errorStream.available()
return if (available <= 0) null else String(ByteArrayOutputStream().apply {
while (available > 0) {