aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/pascal.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/pascal.js')
-rw-r--r--lib/compilers/pascal.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/compilers/pascal.js b/lib/compilers/pascal.js
index f67cfba6c..182ca2a9d 100644
--- a/lib/compilers/pascal.js
+++ b/lib/compilers/pascal.js
@@ -129,14 +129,18 @@ class FPCCompiler extends BaseCompiler {
options.push(projectFile);
return this.exec(compiler, options, execOptions).then(result => {
- const fileWithoutPath = path.basename(inputFilename);
- result.inputFilename = fileWithoutPath;
- result.stdout = utils.parseOutput(result.stdout, fileWithoutPath, tempPath);
- result.stderr = utils.parseOutput(result.stderr, fileWithoutPath, tempPath);
- return result;
+ return this.parseOutput(result, inputFilename, tempPath);
});
}
+ parseOutput(result, inputFilename, tempPath) {
+ const fileWithoutPath = path.basename(inputFilename);
+ result.inputFilename = fileWithoutPath;
+ result.stdout = utils.parseOutput(result.stdout, fileWithoutPath, tempPath);
+ result.stderr = utils.parseOutput(result.stderr, fileWithoutPath, tempPath);
+ return result;
+ }
+
execBinary(executable, result, maxSize) {
executable = path.join(path.dirname(executable), "prog");