From 4805d9276ab2e33d43cd276c8cb5e2f9cfea2ecd Mon Sep 17 00:00:00 2001 From: Yegor Date: Wed, 24 Aug 2016 16:56:26 -0700 Subject: [PATCH] create build directory for startup trace if missing (#5589) --- packages/flutter_tools/lib/src/commands/trace.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/flutter_tools/lib/src/commands/trace.dart b/packages/flutter_tools/lib/src/commands/trace.dart index 2fd1dc9e03..c9f0607d13 100644 --- a/packages/flutter_tools/lib/src/commands/trace.dart +++ b/packages/flutter_tools/lib/src/commands/trace.dart @@ -155,9 +155,14 @@ class Tracing { Future downloadStartupTrace(VMService observatory) async { File traceInfoFile = new File('build/start_up_info.json'); + // Delete old startup data, if any. if (await traceInfoFile.exists()) await traceInfoFile.delete(); + // Create "build" directory, if missing. + if (!(await traceInfoFile.parent.exists())) + await traceInfoFile.parent.create(); + Tracing tracing = new Tracing(observatory); Map timeline = await tracing.stopTracingAndDownloadTimeline(