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

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

Issue 1530453002: Driver failure mode fixes (and test cleanup). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « no previous file | pkg/analyzer_cli/test/driver_test.dart » ('j') | 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 7da6bb41e0ca0edbded103493cf6016572603cfe..d700c4e483c3d178c8ad9dad2b3b1a63b0f3b82b 100644
--- a/pkg/analyzer_cli/lib/src/options.dart
+++ b/pkg/analyzer_cli/lib/src/options.dart
@@ -146,10 +146,12 @@ class CommandLineOptions {
// Check that SDK is specified.
if (sdkPath == null) {
printAndFail('No Dart SDK found.');
+ return null; // Only reachable in testing.
}
// Check that SDK is existing directory.
if (!(new Directory(sdkPath)).existsSync()) {
printAndFail('Invalid Dart SDK path: $sdkPath');
+ return null; // Only reachable in testing.
}
}
@@ -158,6 +160,7 @@ class CommandLineOptions {
if (options.packageRootPath != null &&
options.packageConfigPath != null) {
printAndFail("Cannot specify both '--package-root' and '--packages.");
+ return null; // Only reachable in testing.
}
}
« no previous file with comments | « no previous file | pkg/analyzer_cli/test/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698