Fix path util to return dist paths in tests

This commit is contained in:
Nikolay Krasko
2013-12-04 23:35:51 -08:00
committed by Nikolay Krasko
parent 71be3bcec5
commit d2b948dc2c
5 changed files with 9 additions and 17 deletions
@@ -16,6 +16,7 @@
package org.jetbrains.jet.utils;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.application.PathManager;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.openapi.util.io.FileUtil;
@@ -43,7 +44,9 @@ public class PathUtil {
@NotNull
public static KotlinPaths getKotlinPathsForIdeaPlugin() {
return new KotlinPathsFromHomeDir(getCompilerPathForIdeaPlugin());
return ApplicationManager.getApplication().isUnitTestMode()
? getKotlinPathsForDistDirectory()
: new KotlinPathsFromHomeDir(getCompilerPathForIdeaPlugin());
}
@NotNull