diff --git a/platform/dvcs/testFramework/com/intellij/dvcs/test/Executor.java b/platform/dvcs/testFramework/com/intellij/dvcs/test/Executor.java index bb81acd02ee0..400837369dd6 100644 --- a/platform/dvcs/testFramework/com/intellij/dvcs/test/Executor.java +++ b/platform/dvcs/testFramework/com/intellij/dvcs/test/Executor.java @@ -21,6 +21,7 @@ import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.util.io.FileUtil; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.CharsetToolkit; +import com.intellij.openapi.vfs.VirtualFile; import java.io.File; import java.io.IOException; @@ -53,6 +54,10 @@ public class Executor { } } + public static void cd(VirtualFile dir) { + cd(dir.getPath()); + } + public static String pwd() { return ourCurrentDir; } @@ -157,15 +162,15 @@ public class Executor { for (String dir : path.split(File.pathSeparator)) { File file = new File(dir, name); if (file.canExecute()) { - log("Using $programName from PATH"); + log("Using " + programName + " from PATH"); return file.getPath(); } } } - throw new IllegalStateException("$programName executable not found. " + - "Please define a valid environment variable ${pathEnvs.iterator().next()} " + - "pointing to the $programName executable."); + throw new IllegalStateException(programName + " executable not found. " + + "Please define a valid environment variable " + pathEnvs.iterator().next() + + " pointing to the " + programName + " executable."); } protected static void log(String msg) {