| Index: utils/pub/io.dart
|
| diff --git a/utils/pub/io.dart b/utils/pub/io.dart
|
| index f70849f9a6d31da09e071d08b719a577f13cd390..b227378a28f552f3c541967d640d76d219dd0229 100644
|
| --- a/utils/pub/io.dart
|
| +++ b/utils/pub/io.dart
|
| @@ -563,8 +563,11 @@ Future<String> consumeStringInputStream(StringInputStream stream) {
|
|
|
| /// Wraps [stream] in a single-subscription [Stream] that emits the same data.
|
| Stream<List<int>> wrapInputStream(InputStream stream) {
|
| - var controller = new StreamController.singleSubscription();
|
| - if (stream.closed) return controller..close();
|
| + var controller = new StreamController();
|
| + if (stream.closed) {
|
| + controller.close();
|
| + return controller.stream;
|
| + }
|
|
|
| stream.onClosed = controller.close;
|
| stream.onData = () => controller.add(stream.read());
|
|
|