diff options
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; |