diff --git a/src/util/java/ClaritasWrapper.ts b/src/util/java/ClaritasWrapper.ts index 44a2ff5..101e48b 100644 --- a/src/util/java/ClaritasWrapper.ts +++ b/src/util/java/ClaritasWrapper.ts @@ -23,7 +23,7 @@ export class ClaritasWrapper extends JarExecutor { this.logger.error('Claritas finished with non-zero exit code, ', code) this.lastExecutionResult = undefined! } else { - if(pathExists(this.OUTPUT_FILE)) { + if(await pathExists(this.OUTPUT_FILE)) { this.lastExecutionResult = JSON.parse((await readFile(this.OUTPUT_FILE)).toString('utf8')) } else { this.logger.error('Claritas output file not found when exit code is 0, is this a bug?') @@ -61,7 +61,7 @@ export class ClaritasWrapper extends JarExecutor { } private async cleanOutput(): Promise { - if(pathExists(this.WORK_DIR)) { + if(await pathExists(this.WORK_DIR)) { remove(this.WORK_DIR) } }