more robust;
authorwenzelm
Fri, 16 Jul 2021 22:19:47 +0200
changeset 74022 dfcef9ad5f45
parent 74021 483c200545c8
child 74023 fd4b4385ad3c
more robust;
src/Tools/Setup/isabelle/setup/Build.java
--- a/src/Tools/Setup/isabelle/setup/Build.java	Fri Jul 16 22:14:31 2021 +0200
+++ b/src/Tools/Setup/isabelle/setup/Build.java	Fri Jul 16 22:19:47 2021 +0200
@@ -236,14 +236,15 @@
             PrintStream err_orig = System.err;
             ByteArrayInputStream in = new ByteArrayInputStream(new byte[0]);
             ByteArrayOutputStream out = new ByteArrayOutputStream();
-            PrintStream out_stream = new PrintStream(out);
 
             // Single-threaded context!
             try {
+                PrintStream out_stream = new PrintStream(out);
                 System.setIn(in);
                 System.setOut(out_stream);
                 System.setErr(out_stream);
                 ok = new MainClass().process(args.toArray(String[]::new));
+                out_stream.flush();
             }
             finally {
                 System.setIn(in_orig);