From b83948f241cbf41870f4a36d033cd8da3169b8cc Mon Sep 17 00:00:00 2001 From: Ilya Chernikov Date: Fri, 6 Jul 2018 16:38:56 +0200 Subject: [PATCH] Drop support of KOTLIN_HOME environment variable in the command-line compiler it is proved to be fragile and seems unnecessary at the moment --- .../src/org/jetbrains/kotlin/cli/common/CLICompiler.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.java b/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.java index 064a9d8d69c..98924098437 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.java +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/CLICompiler.java @@ -50,7 +50,6 @@ import static org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity.* public abstract class CLICompiler extends CLITool { public static String KOTLIN_HOME_PROPERTY = "kotlin.home"; - public static String KOTLIN_HOME_ENV_VAR = "KOTLIN_HOME"; // Used in CompilerRunnerUtil#invokeExecMethod, in Eclipse plugin (KotlinCLICompiler) and in kotlin-gradle-plugin (GradleCompilerRunner) @NotNull @@ -165,16 +164,13 @@ public abstract class CLICompiler extends CLI CommonConfigurationKeysKt.setLanguageVersionSettings(configuration, arguments.configureLanguageVersionSettings(collector)); } - private static final String kotlinHomeEnvVar = System.getenv(KOTLIN_HOME_ENV_VAR); - @Nullable private static KotlinPaths computeKotlinPaths(@NotNull MessageCollector messageCollector, @NotNull CommonCompilerArguments arguments) { KotlinPaths paths; String kotlinHomeProperty = System.getProperty(KOTLIN_HOME_PROPERTY); File kotlinHome = arguments.getKotlinHome() != null ? new File(arguments.getKotlinHome()) : - kotlinHomeProperty != null ? new File(kotlinHomeProperty) : - kotlinHomeEnvVar != null ? new File(kotlinHomeEnvVar) + kotlinHomeProperty != null ? new File(kotlinHomeProperty) : null; if (kotlinHome != null) { if (kotlinHome.isDirectory()) {