[tool] when writing to openssl as a part of macOS/iOS code-signing, flush the stdin stream before closing it (#150120)

Fixes https://github.com/flutter/flutter/issues/100584. Might help https://github.com/flutter/flutter/issues/137184.
This commit is contained in:
Andrew Kolos
2024-06-28 15:01:04 -07:00
committed by GitHub
parent 651a17db54
commit 28ff59513b
5 changed files with 166 additions and 7 deletions

View File

@@ -737,3 +737,13 @@ class FakeDevtoolsLauncher extends Fake implements DevtoolsLauncher {
closed = true;
}
}
class ClosedStdinController extends Fake implements StreamSink<List<int>> {
@override
Future<Object?> addStream(Stream<List<int>> stream) async => throw const SocketException('Bad pipe');
@override
Future<Object?> close() async {
return null;
}
}