diff options
author | Austin Morton <apmorton@users.noreply.github.com> | 2021-10-05 00:21:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 23:21:32 -0500 |
commit | 810134942d0e8af494d53dceade0054fa5086129 (patch) | |
tree | 9709639486c6c68a1974178c5485f9c4a9af818b /lib/compilers/kotlin.js | |
parent | a59c3df6535aaf53b8a095d0c664af57764089e5 (diff) | |
download | compiler-explorer-810134942d0e8af494d53dceade0054fa5086129.tar.gz compiler-explorer-810134942d0e8af494d53dceade0054fa5086129.zip |
Avoid calling compilerProps after compiler object construction (#3005)gh-1092
Diffstat (limited to 'lib/compilers/kotlin.js')
-rw-r--r-- | lib/compilers/kotlin.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/compilers/kotlin.js b/lib/compilers/kotlin.js index fca91f634..6b95a4c7d 100644 --- a/lib/compilers/kotlin.js +++ b/lib/compilers/kotlin.js @@ -30,11 +30,15 @@ export class KotlinCompiler extends JavaCompiler { return 'kotlin'; } + constructor(compilerInfo, env) { + super(compilerInfo, env); + this.javaHome = this.compilerProps(`compiler.${this.compiler.id}.java_home`); + } + getDefaultExecOptions() { const execOptions = super.getDefaultExecOptions(); - const javaHome = this.compilerProps(`compiler.${this.compiler.id}.java_home`); - if (javaHome) { - execOptions.env.JAVA_HOME = javaHome; + if (this.javaHome) { + execOptions.env.JAVA_HOME = this.javaHome; } return execOptions; |