diff options
Diffstat (limited to 'lib/compilers/clean.js')
-rw-r--r-- | lib/compilers/clean.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/compilers/clean.js b/lib/compilers/clean.js index 26dfc28c6..c159ba1d5 100644 --- a/lib/compilers/clean.js +++ b/lib/compilers/clean.js @@ -128,7 +128,11 @@ export class CleanCompiler extends BaseCompiler { result.stdout = utils.parseOutput(this.preprocessOutput(result.stdout), inputFilename); result.stderr = utils.parseOutput(this.preprocessOutput(result.stderr), inputFilename); - if (!options.includes('-S')) { + if (options.includes('-S')) { + if (await fs.pathExists(this.getOutputFilename(tmpDir))) { + result.code = 0; + } + } else { const aOut = path.join(tmpDir, 'a.out'); if (await fs.pathExists(aOut)) { await fs.copyFile(aOut, this.getOutputFilename(tmpDir)); @@ -136,10 +140,6 @@ export class CleanCompiler extends BaseCompiler { } else { result.code = 1; } - } else { - if (await fs.pathExists(this.getOutputFilename(tmpDir))) { - result.code = 0; - } } return result; } |