Make the license script compatible with recently changed Dart I/O stream APIs (flutter/engine#9725)

This commit is contained in:
Jason Simmons
2019-07-09 15:00:56 -07:00
committed by GitHub
parent a5799c0964
commit 960bae1cdf
2 changed files with 3 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
Signature: 4f2f6f3820bc3297f81495a994035ef4
Signature: f090834bf22f515d09c8d64dc143db47

View File

@@ -2258,8 +2258,8 @@ class _Progress {
Future<String> _readSignature(String goldenPath) async {
try {
final system.File goldenFile = system.File(goldenPath);
final String goldenSignature = await goldenFile.openRead()
.transform(utf8.decoder).transform(const LineSplitter()).first;
final String goldenSignature = await utf8.decoder.bind(goldenFile.openRead())
.transform(const LineSplitter()).first;
final RegExp signaturePattern = RegExp(r'Signature: (\w+)');
final Match goldenMatch = signaturePattern.matchAsPrefix(goldenSignature);
if (goldenMatch != null)