[flutter_tools] do not use IOSink for writing cache responses (#67231)

Any File-derived IOSink may throw un-handleable async exceptions into the zone, see dart-lang/sdk#43663 . Instead, just write to a file with an append mode.
This commit is contained in:
Jonah Williams
2020-10-05 09:05:41 -07:00
committed by GitHub
parent fdd1bf2944
commit 4ce2a7aa6d
2 changed files with 11 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ import 'package:mockito/mockito.dart';
import '../src/common.dart';
import '../src/mocks.dart';
final Platform testPlatform = FakePlatform(environment: <String, String>{});
final Platform testPlatform = FakePlatform(environment: const <String, String>{});
void main() {
testWithoutContext('ArtifactUpdater can download a zip archive', () async {
@@ -367,6 +367,7 @@ class MockHttpClientResponse extends Mock implements HttpClientResponse {
@override
Future<void> forEach(void Function(List<int> element) action) async {
action(<int>[0]);
return;
}
}