Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Unified Diff: pkg/analyzer_cli/bin/analyzer.dart

Issue 2963323002: Add analytics to analyzer-cli and analysis server. (Closed)
Patch Set: suppress analytics for integration tests; update the gn files Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_cli/bin/analyzer.dart
diff --git a/pkg/analyzer_cli/bin/analyzer.dart b/pkg/analyzer_cli/bin/analyzer.dart
index 3172b0fab730f9adbc26652bfc058dcb5d13936a..f225b841b3830596d4c7e62b7d2b385c91e1cd53 100644
--- a/pkg/analyzer_cli/bin/analyzer.dart
+++ b/pkg/analyzer_cli/bin/analyzer.dart
@@ -3,10 +3,18 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import 'dart:io';
+
import 'package:analyzer_cli/starter.dart';
/// The entry point for the command-line analyzer.
-void main(List<String> args) {
+main(List<String> args) async {
CommandLineStarter starter = new CommandLineStarter();
- starter.start(args);
+
+ // Wait for the starter to complete.
+ await starter.start(args);
+
+ // Call exit() explicitly. Analytics calls could still be ongoing, but we
+ // don't want to delay returning the analysis results because of them.
+ exit(exitCode);
}

Powered by Google App Engine
This is Rietveld 408576698