File tree 2 files changed +18
-3
lines changed 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,15 @@ void _showUsageAndExit() {
23
23
}
24
24
25
25
main (List <String > args) async {
26
- var options = validateOptions (args);
26
+ var options;
27
+
28
+ try {
29
+ options = validateOptions (args);
30
+ } on FormatException catch (e) {
31
+ print ('${e .message }\n ' );
32
+ _showUsageAndExit ();
33
+ }
34
+
27
35
if (options == null || options.help) _showUsageAndExit ();
28
36
29
37
setupLogger (options.logLevel, print);
Original file line number Diff line number Diff line change @@ -29,10 +29,17 @@ main(List<String> args) async {
29
29
..add ('--arrow-fn-bind-this' )
30
30
..addAll (args);
31
31
32
- CompilerOptions options = validateOptions (args, forceOutDir: true );
33
- if (options == null || options.help) {
32
+ CompilerOptions options;
33
+
34
+ try {
35
+ options = validateOptions (args, forceOutDir: true );
36
+ } on FormatException catch (e) {
37
+ print ('${e .message }\n ' );
34
38
_showUsageAndExit ();
35
39
}
40
+
41
+ if (options == null || options.help) _showUsageAndExit ();
42
+
36
43
if (options.inputs.length != 1 ) {
37
44
stderr.writeln ("Please only specify one input to run" );
38
45
_showUsageAndExit ();
You can’t perform that action at this time.
0 commit comments