[Compiler CLI] Use reading language version settings from environment only if the resource is presented or flag is set

This commit is contained in:
Victor Petukhov
2022-02-15 16:27:21 +03:00
committed by teamcity
parent 683a3e74a0
commit 5c8ca0ca9b
5 changed files with 22 additions and 6 deletions
@@ -106,6 +106,7 @@ public abstract class AbstractCliTest extends TestCaseWithTmpdir {
File environmentTestConfig = new File(fileName.replaceFirst("\\.args$", ".env"));
if (environmentTestConfig.exists()) {
compiler.setReadingSettingsFromEnvironmentAllowed(true);
CompilerSystemProperties.LANGUAGE_VERSION_SETTINGS.setValue(FilesKt.readText(environmentTestConfig, Charsets.UTF_8));
}