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 9e32cf0d951015241c42ad50e8f87bdbd0db9a51..ec779a7eb8dda662d1fdfe4fb65c148d403fe406 100644 |
--- a/pkg/analyzer_cli/lib/src/driver.dart |
+++ b/pkg/analyzer_cli/lib/src/driver.dart |
@@ -744,8 +744,12 @@ class Driver implements CommandLineStarter { |
exitCode: ErrorSeverity.ERROR.ordinal); |
} |
} else { |
- return new ContextBuilder(resourceProvider, null, null) |
- .getOptionsFile(options.sourceFiles.first); |
+ filePath = AnalysisEngine.ANALYSIS_OPTIONS_FILE; |
+ file = resourceProvider.getFile(filePath); |
+ if (!file.exists) { |
+ filePath = AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE; |
+ file = resourceProvider.getFile(filePath); |
+ } |
} |
return file; |
} |