Skip to content

Commit 263537c

Browse files
committed
fix: stop CLI when a plugin fails
1 parent 0724ab6 commit 263537c

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

packages/plugin-coverage/src/bin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { executeRunner } from './lib/runner';
22

3-
await executeRunner().catch(console.error);
3+
await executeRunner();

packages/plugin-coverage/src/lib/runner/index.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,13 @@ export async function executeRunner(): Promise<void> {
2020
// Run coverage tool if provided
2121
if (coverageToolCommand != null) {
2222
const { command, args } = coverageToolCommand;
23-
2423
try {
2524
await executeProcess({ command, args });
2625
} catch (error) {
2726
if (error instanceof ProcessError) {
28-
console.info(chalk.bold('stdout from failed process:'));
29-
console.info(error.stdout);
30-
console.error(chalk.bold('stderr from failed process:'));
27+
console.error(chalk.bold('stdout from failed coverage tool process:'));
28+
console.error(error.stdout);
29+
console.error(chalk.bold('stderr from failed coverage tool process:'));
3130
console.error(error.stderr);
3231
}
3332

packages/plugin-eslint/src/bin.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { executeRunner } from './lib/runner';
22

3-
await executeRunner().catch(console.error);
3+
await executeRunner();

0 commit comments

Comments
 (0)