Delete unzipped FlutterMacOS.framework before replacing artifact (#77316)

This commit is contained in:
Jenn Magder
2021-03-04 19:36:21 -08:00
committed by GitHub
parent fcc0042d82
commit a7f7687a2e
2 changed files with 28 additions and 0 deletions

View File

@@ -934,6 +934,7 @@ abstract class EngineCachedArtifact extends CachedArtifact {
final File frameworkZip = fileSystem.file(fileSystem.path.join(dir.path, 'FlutterMacOS.framework.zip'));
if (frameworkZip.existsSync()) {
final Directory framework = fileSystem.directory(fileSystem.path.join(dir.path, 'FlutterMacOS.framework'));
ErrorHandlingFileSystem.deleteIfExists(framework, recursive: true);
framework.createSync();
operatingSystemUtils.unzip(frameworkZip, framework);
}