mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 15:21:31 +00:00
Ignore an exception when deleting the temporary driver cache directory.
Change-Id: I019adc6211af2db861900aaa80a126a48419be77 Reviewed-on: https://dart-review.googlesource.com/66620 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Devon Carew <devoncarew@google.com>
This commit is contained in:
parent
432e59e589
commit
ab0d27b694
|
@ -458,7 +458,7 @@ class Driver implements ServerStarter {
|
|||
|
||||
if (trainDirectory != null) {
|
||||
Directory tempDriverDir =
|
||||
Directory.systemTemp.createTempSync('dartServer');
|
||||
Directory.systemTemp.createTempSync('analysis_server_');
|
||||
analysisServerOptions.cacheFolder = tempDriverDir.path;
|
||||
|
||||
DevAnalysisServer devServer = new DevAnalysisServer(socketServer);
|
||||
|
@ -475,11 +475,17 @@ class Driver implements ServerStarter {
|
|||
print('Analyzing with a populated driver cache:');
|
||||
exitCode = await devServer.processDirectories([trainDirectory]);
|
||||
|
||||
tempDriverDir.deleteSync(recursive: true);
|
||||
if (serve_http) {
|
||||
httpServer.close();
|
||||
}
|
||||
await instrumentationService.shutdown();
|
||||
|
||||
try {
|
||||
tempDriverDir.deleteSync(recursive: true);
|
||||
} catch (_) {
|
||||
// ignore any exception
|
||||
}
|
||||
|
||||
exit(exitCode);
|
||||
}();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue