refactor: exitCode

This commit is contained in:
xiaojunnuo
2021-02-05 17:19:20 +08:00
parent 074c8f7cd0
commit 07066dde87

View File

@@ -82,6 +82,7 @@ export class Executor {
result
}
if (result.status === 'error' && options.args.doNotThrowError === false) {
process.exitCode = 1 // 设置错误码,以便执行者可以获取到异常退出
throw new Error(result.remark)
}
return returnData