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

Unified Diff: pkg/analyzer_cli/lib/src/options.dart

Issue 1859363003: allow --dart-sdk with --persisent_worker (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: code review updates Created 4 years, 8 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
« no previous file with comments | « pkg/analyzer_cli/lib/src/driver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/lib/src/options.dart
diff --git a/pkg/analyzer_cli/lib/src/options.dart b/pkg/analyzer_cli/lib/src/options.dart
index a8fec7965abec4bf7ab191b19d0b34a273e2d964..fc778f471d57a7d149805238dd19f4bfc0b35f65 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -465,9 +465,20 @@ class CommandLineOptions {
// Persistent worker.
if (args.contains('--persistent_worker')) {
- if (args.length != 2 || !args.contains('--build-mode')) {
+ bool validArgs;
+ if (!args.contains('--build-mode')) {
+ validArgs = false;
+ } else if (args.length == 2) {
+ validArgs = true;
+ } else if (args.length == 4 && args.contains('--dart-sdk')) {
+ validArgs = true;
+ } else {
+ validArgs = false;
+ }
+ if (!validArgs) {
printAndFail('The --persistent_worker flag should be used with and '
- 'only with the --build-mode flag.');
+ 'only with the --build-mode flag, and possibly the --dart-sdk '
+ 'option. Got: $args');
return null; // Only reachable in testing.
}
return new CommandLineOptions._fromArgs(results, definedVariables);
« no previous file with comments | « pkg/analyzer_cli/lib/src/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698