| OLD | NEW |
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 import 'dart:io'; |
| 7 |
| 6 import 'package:analyzer_cli/starter.dart'; | 8 import 'package:analyzer_cli/starter.dart'; |
| 7 | 9 |
| 8 /// The entry point for the command-line analyzer. | 10 /// The entry point for the command-line analyzer. |
| 9 void main(List<String> args) { | 11 main(List<String> args) async { |
| 10 CommandLineStarter starter = new CommandLineStarter(); | 12 CommandLineStarter starter = new CommandLineStarter(); |
| 11 starter.start(args); | 13 |
| 14 // Wait for the starter to complete. |
| 15 await starter.start(args); |
| 16 |
| 17 // Call exit() explicitly. Analytics calls could still be ongoing, but we |
| 18 // don't want to delay returning the analysis results because of them. |
| 19 exit(exitCode); |
| 12 } | 20 } |
| OLD | NEW |