Fix file deletion crash in BuildIOSArchiveCommand.runCommand (#138734)

Fixes https://github.com/flutter/flutter/issues/138030
This commit is contained in:
Victoria Ashworth
2023-11-20 13:25:17 -06:00
committed by GitHub
parent 82170c1fe3
commit e826c63aec
2 changed files with 42 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import 'package:unified_analytics/unified_analytics.dart';
import '../base/analyze_size.dart';
import '../base/common.dart';
import '../base/error_handling_io.dart';
import '../base/logger.dart';
import '../base/process.dart';
import '../base/utils.dart';
@@ -492,7 +493,9 @@ class BuildIOSArchiveCommand extends _BuildIOSSubCommand {
],
);
} finally {
generatedExportPlist?.deleteSync();
if (generatedExportPlist != null) {
ErrorHandlingFileSystem.deleteIfExists(generatedExportPlist);
}
status?.stop();
}