mirror of
https://github.com/certd/certd.git
synced 2026-05-18 22:57:31 +08:00
refactor: exitCode
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user