File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/main/java/io/zonky/test/db/postgres/embedded Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -573,20 +573,21 @@ public EmbeddedPostgres start() throws IOException {
573573 }
574574 }
575575
576- private static List < String > system (String ... command )
576+ private void system (String ... command )
577577 {
578578 try {
579579 final ProcessBuilder builder = new ProcessBuilder (command );
580- builder .redirectError (ProcessBuilder .Redirect .PIPE );
581- builder .redirectOutput (ProcessBuilder .Redirect .PIPE );
582580 builder .redirectErrorStream (true );
581+ builder .redirectError (errorRedirector );
582+ builder .redirectOutput (outputRedirector );
583583 final Process process = builder .start ();
584+
585+ if (outputRedirector .type () == ProcessBuilder .Redirect .Type .PIPE ) {
586+ ProcessOutputLogger .logOutput (LOG , process );
587+ }
584588 if (0 != process .waitFor ()) {
585589 throw new IllegalStateException (String .format ("Process %s failed%n%s" , Arrays .asList (command ), IOUtils .toString (process .getErrorStream ())));
586590 }
587- try (InputStream stream = process .getInputStream ()) {
588- return IOUtils .readLines (stream );
589- }
590591 } catch (final RuntimeException e ) { // NOPMD
591592 throw e ;
592593 } catch (final Exception e ) {
You can’t perform that action at this time.
0 commit comments