Index: utils/pub/validator/dependency.dart |
diff --git a/utils/pub/validator/dependency.dart b/utils/pub/validator/dependency.dart |
index 18cff6624b013321e2dc78b7713349f05f89e5f1..5b3634813086fc18e7c03d81a08a29d524224216 100644 |
--- a/utils/pub/validator/dependency.dart |
+++ b/utils/pub/validator/dependency.dart |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
@@ -8,6 +8,7 @@ import 'dart:async'; |
import '../entrypoint.dart'; |
import '../hosted_source.dart'; |
+import '../path_source.dart'; |
import '../http.dart'; |
import '../package.dart'; |
import '../utils.dart'; |
@@ -21,6 +22,11 @@ class DependencyValidator extends Validator { |
Future validate() { |
return Future.forEach(entrypoint.root.pubspec.dependencies, (dependency) { |
+ if (dependency.source is PathSource){ |
+ errors.add('"${dependency.name}" dependancy package must be defined ' |
+ 'using "hosted" or "git" source.'); |
+ return new Future.immediate(null); |
+ } |
if (dependency.source is! HostedSource) { |
return _warnAboutSource(dependency); |
} |