mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 06:25:15 +01:00
Wait on stream redirect futures (update helper task)
This commit is contained in:
parent
6bafacfb14
commit
ada77b3a3b
1 changed files with 4 additions and 2 deletions
|
@ -207,9 +207,10 @@ abstract class RebasePatches : BaseTask() {
|
||||||
.redirectErrorStream(true)
|
.redirectErrorStream(true)
|
||||||
.start()
|
.start()
|
||||||
|
|
||||||
redirect(proc.inputStream, out)
|
val f = redirect(proc.inputStream, out)
|
||||||
|
|
||||||
val exit = proc.waitFor()
|
val exit = proc.waitFor()
|
||||||
|
f.get()
|
||||||
|
|
||||||
if (exit != 0) {
|
if (exit != 0) {
|
||||||
val outStr = String(out.toByteArray())
|
val outStr = String(out.toByteArray())
|
||||||
|
@ -251,8 +252,9 @@ abstract class RebasePatches : BaseTask() {
|
||||||
.redirectErrorStream(true)
|
.redirectErrorStream(true)
|
||||||
.start()
|
.start()
|
||||||
|
|
||||||
redirect(apply2.inputStream, System.out)
|
val f1 = redirect(apply2.inputStream, System.out)
|
||||||
apply2.waitFor()
|
apply2.waitFor()
|
||||||
|
f1.get()
|
||||||
|
|
||||||
logger.lifecycle(outStr)
|
logger.lifecycle(outStr)
|
||||||
logger.lifecycle("Patch failed at $failed; See Git output above.")
|
logger.lifecycle("Patch failed at $failed; See Git output above.")
|
||||||
|
|
Loading…
Reference in a new issue