refactor: 1

This commit is contained in:
xiaojunnuo
2021-03-16 18:25:11 +08:00
parent f4f8067a12
commit 803083d23c
2 changed files with 9 additions and 6 deletions
+6 -5
View File
@@ -88,15 +88,16 @@ export class Executor {
logger.info('任务完成')
trace.print()
const result = resultTrace.get({ })
const returnData = {
if (result) {
if (result.status === 'error' && options.args.doNotThrowError === false) {
throw new Error(result.remark)
}
}
return {
cert,
context,
result
}
if (result.status === 'error' && options.args.doNotThrowError === false) {
throw new Error(result.remark)
}
return returnData
}
async runCertd (certd) {