Skip to content

Commit

Permalink
feat(runner): if some cmd exit with 0 then will not exit with 1
Browse files Browse the repository at this point in the history
  • Loading branch information
ArcherGu committed Jun 14, 2023
1 parent ea29d75 commit 64f1d78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/runner/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ export async function run(command: string, inlineConfig: InlineConfig = {}) {
logger.success(TAG, 'All commands finished successfully')
logger.info(TAG, 'Exiting...')
process.exit(0)
}, () => {
}, (reason) => {
const noError = reason.some((e: any) => e.exitCode === 0)
logger.warn(TAG, 'Some commands exit')
logger.info(TAG, 'Exiting...')
process.exit(1)
process.exit(noError ? 0 : 1)
}).catch((e) => {
logger.error(TAG, e)
logger.info(TAG, 'Exiting...')
Expand Down

0 comments on commit 64f1d78

Please sign in to comment.