Fix signature for TokenTemplate.updateFile (#149673)

This method isn't supposed to do any async work.
This commit is contained in:
Michael Goderbauer 2024-06-05 13:51:06 -07:00 committed by GitHub
parent 8ce3bfb6ca
commit fbc0ff1f3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,7 +69,7 @@ abstract class TokenTemplate {
/// If the file already contains a generated text block matching the
/// [blockName], it will be replaced by the [generate] output. Otherwise
/// the content will just be appended to the end of the file.
Future<void> updateFile() async {
void updateFile() {
final String contents = File(fileName).readAsStringSync();
final String beginComment = '$beginGeneratedComment - $blockName\n';
final String endComment = '$endGeneratedComment - $blockName\n';