| Index: lib/src/pubspec.dart
|
| diff --git a/lib/src/pubspec.dart b/lib/src/pubspec.dart
|
| index 19bd769fcef94b3cfe96bb9cd7ff758996080cab..28b1375cbf9e07ad52445b89d8e7c9c9f300db1a 100644
|
| --- a/lib/src/pubspec.dart
|
| +++ b/lib/src/pubspec.dart
|
| @@ -463,6 +463,8 @@ class Pubspec {
|
| var sourceNames = spec.keys.toList();
|
| if (sourceNames.length > 1) {
|
| _error('A dependency may only have one source.', specNode.span);
|
| + } else if (sourceNames.isEmpty) {
|
| + _error('A dependency must contain a source.', specNode.span);
|
| }
|
|
|
| sourceName = sourceNames.single;
|
|
|