From 461d3dce7c5dd1bdaf3695ad866bccd32deeeba6 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Tue, 13 Jan 2015 15:17:04 +0300 Subject: [PATCH] [git] handle PCE separately --- plugins/git4idea/src/git4idea/commands/GitHandler.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/git4idea/src/git4idea/commands/GitHandler.java b/plugins/git4idea/src/git4idea/commands/GitHandler.java index 3fe591e38d62..5bee0181b257 100644 --- a/plugins/git4idea/src/git4idea/commands/GitHandler.java +++ b/plugins/git4idea/src/git4idea/commands/GitHandler.java @@ -20,6 +20,7 @@ import com.intellij.execution.configurations.GeneralCommandLine; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.diagnostic.Logger; +import com.intellij.openapi.progress.ProcessCanceledException; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Key; import com.intellij.openapi.util.SystemInfo; @@ -480,6 +481,9 @@ public abstract class GitHandler { myProcess = startProcess(); startHandlingStreams(); } + catch (ProcessCanceledException pce) { + cleanupEnv(); + } catch (Throwable t) { if (!ApplicationManager.getApplication().isUnitTestMode() || !myProject.isDisposed()) { LOG.error(t); // will surely happen if called during unit test disposal, because the working dir is simply removed then