Skip to content

Commit b9e2551

Browse files
fix(cli): make run cmd in CLI print a list of collected errors (#1028)
Co-authored-by: Max Prilutskiy <[email protected]>
1 parent a70d3f1 commit b9e2551

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

.changeset/large-beds-cover.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"lingo.dev": patch
3+
---
4+
5+
Make run cmd in CLI print a list of collected errors

packages/cli/src/cli/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ export const colors = {
55
yellow: "#ffcc00",
66
grey: "#808080",
77
red: "#ff0000",
8+
white: "#ffffff",
89
};

packages/cli/src/cli/utils/ui.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,15 @@ export async function renderSummary(results: Map<any, any>) {
9191
(r) => r.status === "error",
9292
).length;
9393
console.log(`• ${chalk.hex(colors.yellow)(failedTasksCount)} failed`);
94+
95+
if (failedTasksCount > 0) {
96+
console.log(chalk.hex(colors.orange)("\n[Failed]"));
97+
for (const result of Array.from(results.values()).filter(
98+
(r) => r.status === "error",
99+
)) {
100+
console.log(
101+
`❌ ${chalk.hex(colors.white)(String(result.error.message))}\n`,
102+
);
103+
}
104+
}
94105
}

0 commit comments

Comments
 (0)