(executable: string, executeParameters: ExecutableExecutionOptions, homeDir: string)
| 1044 | } |
| 1045 | |
| 1046 | override async runExecutable(executable: string, executeParameters: ExecutableExecutionOptions, homeDir: string) { |
| 1047 | const execOptionsCopy: ExecutableExecutionOptions = JSON.parse( |
| 1048 | JSON.stringify(executeParameters), |
| 1049 | ) as ExecutableExecutionOptions; |
| 1050 | |
| 1051 | if (this.compiler.executionWrapper) { |
| 1052 | execOptionsCopy.args = [...this.compiler.executionWrapperArgs, executable, ...execOptionsCopy.args]; |
| 1053 | executable = this.compiler.executionWrapper; |
| 1054 | } |
| 1055 | |
| 1056 | const isCoreClr = this.compiler.group === 'dotnetcoreclr'; |
| 1057 | const isMono = this.compiler.group === 'dotnetmono'; |
| 1058 | |
| 1059 | if (!isCoreClr && !isMono) { |
| 1060 | return { |
| 1061 | ...utils.getEmptyExecutionResult(), |
| 1062 | stdout: [], |
| 1063 | stderr: utils.parseOutput('Execution is only supported for CoreCLR and Mono compilers'), |
| 1064 | code: -1, |
| 1065 | }; |
| 1066 | } |
| 1067 | |
| 1068 | const compilerInfo = await this.getCompilerInfo(this.lang.id); |
| 1069 | const extraConfiguration: DotnetExtraConfiguration = { |
| 1070 | buildConfig: this.buildConfig, |
| 1071 | clrBuildDir: isMono ? path.join(this.clrBuildDir, 'mono') : this.clrBuildDir, |
| 1072 | langVersion: this.langVersion, |
| 1073 | targetFramework: compilerInfo.targetFramework, |
| 1074 | corerunPath: this.corerunPath, |
| 1075 | }; |
| 1076 | |
| 1077 | const execEnv: IExecutionEnvironment = new this.executionEnvironmentClass(this.env); |
| 1078 | return await execEnv.execBinary(executable, execOptionsCopy, homeDir, extraConfiguration); |
| 1079 | } |
| 1080 | } |
| 1081 | |
| 1082 | interface DotNetCompilerInfo { |
nothing calls this directly
no test coverage detected