aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2014-04-19 18:02:48 -0700
committerShawn Pearce <spearce@spearce.org>2014-04-21 11:41:05 -0700
commit05226ac9502670d4d49228aba2c5ff8ce837b85c (patch)
tree468c22adc142c3752d8c5039e04a1aad2d8869c3 /org.eclipse.jgit.pgm
parent911b1157725ec697036057b519071fd0e5c98fe2 (diff)
downloadjgit-05226ac9502670d4d49228aba2c5ff8ce837b85c.tar.gz
jgit-05226ac9502670d4d49228aba2c5ff8ce837b85c.zip
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
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
index 94591393af..ea2ef358b7 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -224,6 +224,8 @@ public class Main {
} finally {
if (cmd.outw != null)
cmd.outw.flush();
+ if (cmd.errw != null)
+ cmd.errw.flush();
}
}