| Index: pkg/analyzer_cli/lib/src/driver.dart
|
| diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
|
| index 4942015e2c192b1339f78f610338d0d1cbfd69f7..6effac46e8c23428412b34e87664bc549de731c1 100644
|
| --- a/pkg/analyzer_cli/lib/src/driver.dart
|
| +++ b/pkg/analyzer_cli/lib/src/driver.dart
|
| @@ -587,8 +587,13 @@ class Driver implements CommandLineStarter {
|
| // the command lines sent to stdin. So process it before deciding whether
|
| // to activate batch mode.
|
| if (sdk == null) {
|
| - sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath));
|
| - sdk.useSummary = true;
|
| + String dartSdkPath = options.dartSdkPath;
|
| + sdk = new DirectoryBasedDartSdk(new JavaFile(dartSdkPath));
|
| + sdk.useSummary = options.sourceFiles.every((String sourcePath) {
|
| + sourcePath = path.absolute(sourcePath);
|
| + sourcePath = path.normalize(sourcePath);
|
| + return !path.isWithin(dartSdkPath, sourcePath);
|
| + });
|
| sdk.analysisOptions = createAnalysisOptionsForCommandLineOptions(options);
|
| }
|
| _isBatch = options.shouldBatch;
|
|
|