Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
OfekShilon committed Nov 1, 2023
1 parent f9e52f9 commit e16c641
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions lib/base-compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -551,10 +551,25 @@ export class BaseCompiler implements ICompiler {
return result;
}

processExecutionResult(input: UnprocessedExecResult, inputFilename?: string): BasicExecutionResult {
processExecutionResult(
input: UnprocessedExecResult,
inputFilename?: string,
matchSource: boolean = true,
): BasicExecutionResult {
const start = performance.now();
const stdout = utils.parseOutput(input.stdout, inputFilename);
const stderr = utils.parseOutput(input.stderr, inputFilename);
let stdout: ResultLine[] = [];
let stderr: ResultLine[] = [];
if (matchSource) {
stdout = utils.parseOutput(input.stdout, inputFilename);
stderr = utils.parseOutput(input.stderr, inputFilename);
} else {
utils.eachLine(input.stdout, line => {
stdout.push({text: line});
});
utils.eachLine(input.stderr, line => {
stderr.push({text: line});
});
}
const end = performance.now();
return {
...input,
Expand Down Expand Up @@ -605,7 +620,7 @@ export class BaseCompiler implements ICompiler {
appHome: homeDir,
});

return this.processExecutionResult(execResult);
return this.processExecutionResult(execResult, undefined, false /*matchSource*/);
} catch (err: UnprocessedExecResult | any) {
if (err.code && err.stderr) {
return this.processExecutionResult(err);
Expand Down

0 comments on commit e16c641

Please sign in to comment.