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

Unified Diff: lib/src/command/list_package_dirs.dart

Issue 1228683003: Fix various pub issues. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 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
Index: lib/src/command/list_package_dirs.dart
diff --git a/lib/src/command/list_package_dirs.dart b/lib/src/command/list_package_dirs.dart
index 9f6a1e2b00b1493ddbfb24feb86f4fb6d8331f3d..fe3627258846ab8e2ba1f6b2adc40edf4a9cff43 100644
--- a/lib/src/command/list_package_dirs.dart
+++ b/lib/src/command/list_package_dirs.dart
@@ -6,7 +6,7 @@ library pub.command.list_package_dirs;
import 'dart:async';
-import 'package:path/path.dart' as path;
+import 'package:path/path.dart' as p;
import '../command.dart';
import '../log.dart' as log;
@@ -41,20 +41,23 @@ class ListPackageDirsCommand extends PubCommand {
entrypoint.lockFile.packages.forEach((name, package) {
var source = entrypoint.cache.sources[package.source];
futures.add(source.getDirectory(package).then((packageDir) {
- packages[name] = path.join(packageDir, "lib");
+ // Normalize paths and make them absolute for backwards compatibility
+ // with the protocol used by the analyzer.
+ packages[name] = p.normalize(p.absolute(p.join(packageDir, "lib")));
}));
});
output["packages"] = packages;
// Include the self link.
- packages[entrypoint.root.name] = entrypoint.root.path("lib");
+ packages[entrypoint.root.name] =
+ p.normalize(p.absolute(entrypoint.root.path("lib")));
// Include the file(s) which when modified will affect the results. For pub,
// that's just the pubspec and lockfile.
output["input_files"] = [
- entrypoint.lockFilePath,
- entrypoint.pubspecPath
+ p.normalize(p.absolute(entrypoint.lockFilePath)),
+ p.normalize(p.absolute(entrypoint.pubspecPath))
];
return Future.wait(futures).then((_) {
« no previous file with comments | « lib/src/barback/dart2js_transformer.dart ('k') | lib/src/dart.dart » ('j') | lib/src/dart.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698