Merge remote-tracking branch 'origin/master'

This commit is contained in:
Konstantin Bulenkov
2017-01-25 13:31:22 +03:00
3 changed files with 14 additions and 5 deletions
@@ -127,7 +127,9 @@ public class AbstractTreeUpdater implements Disposable, Activatable {
for (Iterator<TreeUpdatePass> iterator = myNodeQueue.iterator(); iterator.hasNext();) {
final TreeUpdatePass passInQueue = iterator.next();
if (toAdd.isUpdateStructure() == passInQueue.isUpdateStructure()) {
boolean isMatchingPass =
toAdd.isUpdateStructure() == passInQueue.isUpdateStructure() && toAdd.isUpdateChildren() == passInQueue.isUpdateChildren();
if (isMatchingPass) {
if (passInQueue == toAdd) {
toAdd.expire();
break;
@@ -27,6 +27,7 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.CharsetToolkit;
import com.intellij.util.concurrency.AppExecutorUtil;
import com.intellij.util.concurrency.FixedFuture;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.io.BaseOutputReader;
import com.intellij.util.text.CaseInsensitiveStringHashingStrategy;
import gnu.trove.THashMap;
@@ -210,14 +211,20 @@ public class EnvironmentUtil {
return parseEnv(lines, lineSeparator);
}
@NotNull
protected List<String> getShellProcessCommand() throws Exception {
String shell = getShell();
if (shell == null || !new File(shell).canExecute()) {
throw new Exception("shell:" + shell);
}
return new ArrayList<String>(Arrays.asList(shell, "-l", "-i"));
List<String> commands = ContainerUtil.newArrayList(shell);
if (!shell.endsWith("/tcsh")) {
// Act as a login shell
// tsch does allow to use -l with any other options
commands.add("-l");
}
commands.add("-i"); // enable interactive shell
return commands;
}
@Nullable
@@ -86,7 +86,7 @@ class PyVirtualEnvReader(val virtualEnvSdkPath: String) : EnvironmentUtil.ShellE
}
override fun getShellProcessCommand(): MutableList<String>? {
override fun getShellProcessCommand(): MutableList<String> {
val shellPath = shell
if (shellPath == null || !File(shellPath).canExecute()) {