Index: utils/pub/oauth2.dart |
diff --git a/utils/pub/oauth2.dart b/utils/pub/oauth2.dart |
index 85bfed719328f178cef6ccd3d44aef196c43c0a2..9f2843ba0d4b4a06d3e3af03eee7bcb2089eec69 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(); |