mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
Protect the deletion of the local engine temp dir in case it is already deleted (#57345)
This commit is contained in:
parent
07f9563dac
commit
5c78e723fb
|
@ -1001,8 +1001,11 @@ Directory _getLocalEngineRepo({
|
|||
.createTempSync('flutter_tool_local_engine_repo.');
|
||||
|
||||
// Remove the local engine repo before the tool exits.
|
||||
shutdownHooks.addShutdownHook(
|
||||
() => localEngineRepo.deleteSync(recursive: true),
|
||||
shutdownHooks.addShutdownHook(() {
|
||||
if (localEngineRepo.existsSync()) {
|
||||
localEngineRepo.deleteSync(recursive: true);
|
||||
}
|
||||
},
|
||||
ShutdownStage.CLEANUP,
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue