Commit 4805d927 authored by Yegor's avatar Yegor Committed by GitHub

create build directory for startup trace if missing (#5589)

parent 0e63e470
...@@ -155,9 +155,14 @@ class Tracing { ...@@ -155,9 +155,14 @@ class Tracing {
Future<Null> downloadStartupTrace(VMService observatory) async { Future<Null> downloadStartupTrace(VMService observatory) async {
File traceInfoFile = new File('build/start_up_info.json'); File traceInfoFile = new File('build/start_up_info.json');
// Delete old startup data, if any.
if (await traceInfoFile.exists()) if (await traceInfoFile.exists())
await traceInfoFile.delete(); await traceInfoFile.delete();
// Create "build" directory, if missing.
if (!(await traceInfoFile.parent.exists()))
await traceInfoFile.parent.create();
Tracing tracing = new Tracing(observatory); Tracing tracing = new Tracing(observatory);
Map<String, dynamic> timeline = await tracing.stopTracingAndDownloadTimeline( Map<String, dynamic> timeline = await tracing.stopTracingAndDownloadTimeline(
......
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