mirror of https://github.com/certd/certd
refactor: exitCode
parent
074c8f7cd0
commit
07066dde87
|
@ -82,6 +82,7 @@ export class Executor {
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
if (result.status === 'error' && options.args.doNotThrowError === false) {
|
if (result.status === 'error' && options.args.doNotThrowError === false) {
|
||||||
|
process.exitCode = 1 // 设置错误码,以便执行者可以获取到异常退出
|
||||||
throw new Error(result.remark)
|
throw new Error(result.remark)
|
||||||
}
|
}
|
||||||
return returnData
|
return returnData
|
||||||
|
|
Loading…
Reference in New Issue