From f612e0e89f37eba258b02b2149c014b8160434c9 Mon Sep 17 00:00:00 2001 From: Daniel Scalzi Date: Tue, 28 Sep 2021 21:28:19 -0400 Subject: [PATCH] Fix upgrade bug. --- src/util/java/ClaritasWrapper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) } }