diff --git a/plugins/git4idea/src/git4idea/commands/GitBinaryHandler.java b/plugins/git4idea/src/git4idea/commands/GitBinaryHandler.java index f0db4847d85e..acc748a76d5b 100644 --- a/plugins/git4idea/src/git4idea/commands/GitBinaryHandler.java +++ b/plugins/git4idea/src/git4idea/commands/GitBinaryHandler.java @@ -96,19 +96,20 @@ public class GitBinaryHandler extends GitHandler { @Override protected void waitForProcess() { + int exitCode; try { mySteamSemaphore.acquire(2); myProcess.waitFor(); - int exitCode = myProcess.exitValue(); - setExitCode(exitCode); + exitCode = myProcess.exitValue(); } catch (InterruptedException e) { if (LOG.isDebugEnabled()) { LOG.debug("Ignoring process exception: ", e); } - setExitCode(255); + exitCode = 255; } - listeners().processTerminated(getExitCode()); + setExitCode(exitCode); + listeners().processTerminated(exitCode); } /**