mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +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.');
|
.createTempSync('flutter_tool_local_engine_repo.');
|
||||||
|
|
||||||
// Remove the local engine repo before the tool exits.
|
// Remove the local engine repo before the tool exits.
|
||||||
shutdownHooks.addShutdownHook(
|
shutdownHooks.addShutdownHook(() {
|
||||||
() => localEngineRepo.deleteSync(recursive: true),
|
if (localEngineRepo.existsSync()) {
|
||||||
|
localEngineRepo.deleteSync(recursive: true);
|
||||||
|
}
|
||||||
|
},
|
||||||
ShutdownStage.CLEANUP,
|
ShutdownStage.CLEANUP,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user