Fix path util to return dist paths in tests
This commit is contained in:
committed by
Nikolay Krasko
parent
71be3bcec5
commit
d2b948dc2c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user