Unverified Commit 5c78e723 authored by Jim Graham's avatar Jim Graham Committed by GitHub

Protect the deletion of the local engine temp dir in case it is already deleted (#57345)

parent 07f9563d
......@@ -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,
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment