mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[dvcs tests] Fix log messages; add another cd() variant
Log messages weren't converted when the Executor class was converted from Groovy to Java.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user