Chromium Code Reviews| Index: utils/pub/pubspec.dart |
| diff --git a/utils/pub/pubspec.dart b/utils/pub/pubspec.dart |
| index 04c942e60887de8c34c4708704345e2b70cbf279..94b03f239f956998a28b7b0d99a84f54e7166efc 100644 |
| --- a/utils/pub/pubspec.dart |
| +++ b/utils/pub/pubspec.dart |
| @@ -42,6 +42,10 @@ class Pubspec { |
| if (contents.trim() == '') return new Pubspec.empty(); |
| var parsedPubspec = loadYaml(contents); |
| + if (parsedPubspec == null) { |
|
nweiz
2012/07/16 19:34:02
Nit: we usually do single-line if statements when
|
| + // content just yaml comments |
| + return new Pubspec.empty(); |
| + } |
| if (parsedPubspec is! Map) { |
| throw new FormatException('The pubspec must be a YAML mapping.'); |
| } |