From bffa7ed5550dd49f32fb00ac65613b798365d2a8 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Tue, 22 Sep 2015 19:15:35 +0300 Subject: [PATCH] [git] don't set exit code if already set to avoid overriding manual exit code by processTerminated(). --- plugins/git4idea/src/git4idea/commands/GitHandler.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/git4idea/src/git4idea/commands/GitHandler.java b/plugins/git4idea/src/git4idea/commands/GitHandler.java index 55f856fb0ec9..edced19ad832 100644 --- a/plugins/git4idea/src/git4idea/commands/GitHandler.java +++ b/plugins/git4idea/src/git4idea/commands/GitHandler.java @@ -580,7 +580,12 @@ public abstract class GitHandler { * @param exitCode a exit code for process */ protected synchronized void setExitCode(int exitCode) { - myExitCode = exitCode; + if (myExitCode == null) { + myExitCode = exitCode; + } + else { + LOG.info("Not setting exit code " + exitCode + ", because it was already set to " + myExitCode); + } } /**