MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / exec

Method exec

lib/compilers/dosbox-compiler.ts:139–159  ·  view source on GitHub ↗
(filepath: string, args: string[], execOptions: any)

Source from the content-addressed store, hash-verified

137 }
138
139 public override async exec(filepath: string, args: string[], execOptions: any) {
140 if (!execOptions) {
141 execOptions = this.getDefaultExecOptions();
142 }
143
144 execOptions.env = this.getDosboxEnv();
145
146 if (!execOptions.customCwd) {
147 execOptions.customCwd = await this.newTempDir();
148 }
149
150 const tempDir = execOptions.customCwd;
151 const fullArgs = this.getDosboxArgs(tempDir, args);
152
153 const result = await exec.executeDirect(this.dosbox, fullArgs, execOptions);
154
155 const stdoutFilename = path.join(tempDir, 'STDOUT.TXT');
156 result.stdout = await fs.readFile(stdoutFilename, 'utf-8');
157
158 return result;
159 }
160
161 public override async runCompiler(
162 compiler: string,

Callers 1

execCompilerCachedMethod · 0.95

Calls 5

getDosboxEnvMethod · 0.95
getDosboxArgsMethod · 0.95
newTempDirMethod · 0.80
readFileMethod · 0.80
getDefaultExecOptionsMethod · 0.45

Tested by

no test coverage detected