Index: utils/pub/oauth2.dart |
diff --git a/utils/pub/oauth2.dart b/utils/pub/oauth2.dart |
index 4a436811a6e919baba36286a0bb75b5b8ef7c979..e4b8ee07283706bd99133c3ca4c3774e1d2243ca 100644 |
--- a/utils/pub/oauth2.dart |
+++ b/utils/pub/oauth2.dart |
@@ -104,7 +104,7 @@ Future withClient(SystemCache cache, Future fn(Client client)) { |
/// Gets a new OAuth2 client. If saved credentials are available, those are |
/// used; otherwise, the user is prompted to authorize the pub client. |
Future<Client> _getClient(SystemCache cache) { |
- return new Future.of(() { |
+ return new Future.sync(() { |
var credentials = _loadCredentials(cache); |
if (credentials == null) return _authorize(); |