Index: utils/pub/command_uploader.dart |
diff --git a/utils/pub/command_uploader.dart b/utils/pub/command_uploader.dart |
index 445b61e58a921a08037465a085b296ced9f0ee03..a8c2100647518f3241258eb42d21441a91f02bad 100644 |
--- a/utils/pub/command_uploader.dart |
+++ b/utils/pub/command_uploader.dart |
@@ -58,11 +58,10 @@ class UploaderCommand extends PubCommand { |
exit(exit_codes.USAGE); |
} |
- return new Future.immediate(null).then((_) { |
+ return defer(() { |
var package = commandOptions['package']; |
if (package != null) return package; |
- return Entrypoint.load(path.current, cache) |
- .then((entrypoint) => entrypoint.root.name); |
+ return new Entrypoint(path.current, cache).root.name; |
}).then((package) { |
var uploader = commandOptions.rest[0]; |
return oauth2.withClient(cache, (client) { |