Fix upgrade bug.

This commit is contained in:
Daniel Scalzi
2021-09-28 21:28:19 -04:00
parent 3656bf52e4
commit f612e0e89f

View File

@@ -23,7 +23,7 @@ export class ClaritasWrapper extends JarExecutor<ClaritasResult> {
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<ClaritasResult> {
}
private async cleanOutput(): Promise<void> {
if(pathExists(this.WORK_DIR)) {
if(await pathExists(this.WORK_DIR)) {
remove(this.WORK_DIR)
}
}