File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ for (const arg of args) {
44
44
if ( assertType ( value , 'json' ) ) options . format = value ;
45
45
else errors . push ( wrongOption ( key , value ) ) ;
46
46
break ;
47
+ case 'filename' :
48
+ if ( assertType ( value , 'string' ) ) options . filename = value ;
49
+ else errors . push ( wrongOption ( key , value ) ) ;
50
+ break ;
47
51
case 'supportedLangs' :
48
52
if ( assertType ( value , 'array' ) ) options . supportedLangs = value ;
49
53
else if ( assertType ( value , 'string' ) ) options . supportedLangs = [ value ] ;
@@ -70,12 +74,12 @@ if (!options.supportedLangs) errors.push(missingOption('supportedLangs'));
70
74
71
75
// Log errors
72
76
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:' ) ;
74
78
for ( const error of errors ) {
75
- console . log ( '\x1b[33m%s\x1b[0m' , error ) ;
79
+ console . log ( error ) ;
76
80
}
77
81
78
- process . exitCode = 1 ; // Exit process
82
+ process . exit ( 1 ) ; // Exit process
79
83
}
80
84
81
85
// Process
You can’t perform that action at this time.
0 commit comments