diff --git a/plugins/git4idea/src/git4idea/GitVcs.java b/plugins/git4idea/src/git4idea/GitVcs.java index 96fa9819e252..5471c8710096 100644 --- a/plugins/git4idea/src/git4idea/GitVcs.java +++ b/plugins/git4idea/src/git4idea/GitVcs.java @@ -346,8 +346,12 @@ public class GitVcs extends AbstractVcs { protected void activate() { isActivated = true; myExecutableValidator = new GitExecutableValidator(myProject); - myExecutableValidator.checkExecutableAndShowDialogIfNeeded(); - checkVersion(); + + if (!ApplicationManager.getApplication().isHeadlessEnvironment()) { + myExecutableValidator.checkExecutableAndShowDialogIfNeeded(); + checkVersion(); + } + if (!myProject.isDefault() && myRootTracker == null) { myRootTracker = new GitRootTracker(this, myProject, myRootListeners.getMulticaster()); }