Skip to content

Commit 606e793

Browse files
committed
Refactor taskRunner to ensure silent mode properly suppresses logging output in all cases
1 parent e681201 commit 606e793

1 file changed

Lines changed: 13 additions & 10 deletions

File tree

src/parser/taskRunner.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,22 @@ export async function taskRunner(
3030
})
3131
.then((consolidated) => {
3232
/** Log the results */
33-
if (args.options?.silent !== true) {
34-
for (const result of consolidated) {
35-
if (result.blocks.length > 0) {
36-
/**
37-
* Add the strings to the destination set
38-
*/
39-
destination.addArray(result.blocks);
40-
const strings = result.blocks.map((b) => b.msgid);
41-
/* Log the results */
33+
for (const result of consolidated) {
34+
if (result.blocks.length > 0) {
35+
/**
36+
* Add the strings to the destination set
37+
*/
38+
destination.addArray(result.blocks);
39+
const strings = result.blocks.map((b) => b.msgid);
40+
41+
/* Log the results */
42+
if (args.options?.silent !== true) {
4243
messages.push(
4344
`✅ ${result.path} - ${strings.length} strings found [${strings.join(", ")}]`,
4445
);
45-
} else messages.push(`❌ ${result.path} - has no strings`);
46+
}
47+
} else if (args.options?.silent !== true) {
48+
messages.push(`❌ ${result.path} - has no strings`);
4649
}
4750
}
4851
})

0 commit comments

Comments
 (0)