| Index: utils/pub/hosted_source.dart
|
| diff --git a/utils/pub/hosted_source.dart b/utils/pub/hosted_source.dart
|
| index 5e48153260e195d4206ea1c48b11a65d650c5729..5a62882a4399b317ab58a59ff63c4db76d8815f5 100644
|
| --- a/utils/pub/hosted_source.dart
|
| +++ b/utils/pub/hosted_source.dart
|
| @@ -56,9 +56,8 @@ class HostedSource extends Source {
|
| var parsed = _parseDescription(id.description);
|
| var fullUrl = "${parsed.last}/packages/${parsed.first}/versions/"
|
| "${id.version}.yaml";
|
| - return consumeInputStream(httpGet(fullUrl)).transform((data) {
|
| - return new Pubspec.parse(
|
| - new String.fromCharCodes(data), systemCache.sources);
|
| + return httpGetString(fullUrl).transform((yaml) {
|
| + return new Pubspec.parse(yaml, systemCache.sources);
|
| });
|
| }
|
|
|
| @@ -70,9 +69,10 @@ class HostedSource extends Source {
|
| var name = parsedDescription.first;
|
| var url = parsedDescription.last;
|
|
|
| - return ensureDir(destPath).chain((destDir) {
|
| - var fullUrl = "$url/packages/$name/versions/${id.version}.tar.gz";
|
| - return extractTarGz(httpGet(fullUrl), destDir);
|
| + var fullUrl = "$url/packages/$name/versions/${id.version}.tar.gz";
|
| + return Futures.wait([httpGet(fullUrl), ensureDir(destPath)]).chain((args) {
|
| + return future(extractTarGz(args[0], args[1]), HTTP_TIMEOUT,
|
| + 'Timed out while fetching URL "$fullUrl".');
|
| });
|
| }
|
|
|
|
|