diff options
Diffstat (limited to 'lib/compilers')
-rw-r--r-- | lib/compilers/hook.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/compilers/hook.ts b/lib/compilers/hook.ts index 26ebc42fe..63cf6f8fc 100644 --- a/lib/compilers/hook.ts +++ b/lib/compilers/hook.ts @@ -41,14 +41,19 @@ export class HookCompiler extends BaseCompiler { return path.join(dirPath, 'example.out'); } + override getDefaultExecOptions(): ExecutionOptions { + const execOptions = super.getDefaultExecOptions(); + const compilerPath = path.dirname(this.compiler.exe); + execOptions.env.HOOK_HOME = path.join(compilerPath, '..'); + return execOptions; + } + override async runCompiler( compiler: string, options: string[], inputFilename: string, execOptions: ExecutionOptions, ): Promise<CompilationResult> { - const compilerPath = path.dirname(compiler); - execOptions.env.HOOK_HOME = path.join(compilerPath, '..'); const dirPath = path.dirname(inputFilename); const outputFilename = this.getOutputFilename(dirPath); options.push(outputFilename); |