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

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

Issue 1762363002: Fix path handling when creating summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « no previous file | 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/package_analyzer.dart
diff --git a/pkg/analyzer_cli/lib/src/package_analyzer.dart b/pkg/analyzer_cli/lib/src/package_analyzer.dart
index 746c77a22d14836f4e9475346f2086cc6ed2855c..e93dba968e2053e8030c7258933125d7b81359ae 100644
--- a/pkg/analyzer_cli/lib/src/package_analyzer.dart
+++ b/pkg/analyzer_cli/lib/src/package_analyzer.dart
@@ -45,7 +45,8 @@ class PackageAnalyzer {
* Perform package analysis according to the given [options].
*/
ErrorSeverity analyze() {
- packagePath = options.packageModePath;
+ packagePath = resourceProvider.pathContext
+ .join(io.Directory.current.absolute.path, options.packageModePath);
scheglov 2016/03/04 19:15:22 Should we use both absolute() and normalize()?
Paul Berry 2016/03/04 22:11:23 Using normalize() seems like a good idea. Done.
packageLibPath = resourceProvider.pathContext.join(packagePath, 'lib');
if (packageLibPath == null) {
errorSink.writeln('--package-mode-path must be set to the root '
@@ -66,7 +67,6 @@ class PackageAnalyzer {
ChangeSet changeSet = new ChangeSet();
for (String path in options.sourceFiles) {
if (AnalysisEngine.isDartFileName(path)) {
- path = resourceProvider.pathContext.absolute(path);
File file = resourceProvider.getFile(path);
if (!file.exists) {
errorSink.writeln('File not found: $path');
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698