Skip to content

Commit ce1beff

Browse files
committed
Tools(extract): fix filename option (#74)
1 parent e5fc41f commit ce1beff

File tree

1 file changed

+7
-3
lines changed
  • packages/qwik-speak/tools/extract

1 file changed

+7
-3
lines changed

packages/qwik-speak/tools/extract/cli.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ for (const arg of args) {
4444
if (assertType(value, 'json')) options.format = value;
4545
else errors.push(wrongOption(key, value));
4646
break;
47+
case 'filename':
48+
if (assertType(value, 'string')) options.filename = value;
49+
else errors.push(wrongOption(key, value));
50+
break;
4751
case 'supportedLangs':
4852
if (assertType(value, 'array')) options.supportedLangs = value;
4953
else if (assertType(value, 'string')) options.supportedLangs = [value];
@@ -70,12 +74,12 @@ if (!options.supportedLangs) errors.push(missingOption('supportedLangs'));
7074

7175
// Log errors
7276
if (errors.length > 0) {
73-
console.log('\x1b[36m%s\x1b[0m', 'Qwik Speak Extract options errors:');
77+
console.log('\x1b[31m%s\x1b[0m', 'Qwik Speak Extract errors:');
7478
for (const error of errors) {
75-
console.log('\x1b[33m%s\x1b[0m', error);
79+
console.log(error);
7680
}
7781

78-
process.exitCode = 1; // Exit process
82+
process.exit(1); // Exit process
7983
}
8084

8185
// Process

0 commit comments

Comments
 (0)