Browse Source

pgm: Flush stderr during shutdown

If an error occurs in command line option parsing the error message
may be stuck in a Java level buffer.  Flush the stream to ensure
everything is made available to the calling process or terminal.

Change-Id: I55b16e43aa96fc81c1197121032f5cdd901d412c
stable-3.4
Shawn Pearce 11 years ago
parent
commit
05226ac950
  1. 2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java

2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java

@ -224,6 +224,8 @@ public class Main {
} finally { } finally {
if (cmd.outw != null) if (cmd.outw != null)
cmd.outw.flush(); cmd.outw.flush();
if (cmd.errw != null)
cmd.errw.flush();
} }
} }

Loading…
Cancel
Save