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'); |