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

Unified Diff: utils/pub/pubspec.dart

Issue 10875056: Properly handle Git URLs with trailing slashes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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: utils/pub/pubspec.dart
diff --git a/utils/pub/pubspec.dart b/utils/pub/pubspec.dart
index 2b82a71acb76f4da67a83adda9a3d9865fbb724c..ca3ae9142f3f68d9087ed9bb1ed7f59902277abf 100644
--- a/utils/pub/pubspec.dart
+++ b/utils/pub/pubspec.dart
@@ -110,6 +110,13 @@ class Pubspec {
source.validateDescription(description, fromLockFile: false);
+ var nameFromSource = source.packageName(description);
+ if (nameFromSource != name) {
+ throw new FormatException('The name you specified for your '
+ 'dependency, "$name", doesn\'t match the name "$nameFromSource" '
+ '(from "$description").');
+ }
+
dependencies.add(new PackageRef(
source, versionConstraint, description));
});

Powered by Google App Engine
This is Rietveld 408576698