Index: sdk/lib/_internal/pub/lib/src/source/hosted.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/source/hosted.dart b/sdk/lib/_internal/pub/lib/src/source/hosted.dart |
index 593f99353467837b6aa12fec735f22fbcb79cd15..f1649d1c17d7a56d08e652c5aa014bf606d73f80 100644 |
--- a/sdk/lib/_internal/pub/lib/src/source/hosted.dart |
+++ b/sdk/lib/_internal/pub/lib/src/source/hosted.dart |
@@ -134,9 +134,8 @@ class HostedSource extends CachedSource { |
var url = _directoryToUrl(path.basename(serverDir)); |
var packages = _getCachedPackagesInDirectory(path.basename(serverDir)); |
packages.sort(Package.orderByNameAndVersion); |
- // TODO(nweiz): Use a normal for loop here when |
- // https://github.com/dart-lang/async_await/issues/72 is fixed. |
- await Future.forEach(packages, (package) async { |
+ |
+ for (var package in packages) { |
try { |
await _download(url, package.name, package.version, package.dir); |
successes++; |
@@ -150,7 +149,7 @@ class HostedSource extends CachedSource { |
tryDeleteEntry(package.dir); |
} |
- }); |
+ } |
} |
return new Pair(successes, failures); |