From 2259c59be84f8ec81d11c3951bd819b481875598 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 15 Aug 2016 22:51:40 -0700 Subject: [PATCH] update the cache earlier (#5415) * update the cache earlier * add documentation --- packages/flutter_tools/lib/src/runner/flutter_command.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/flutter_tools/lib/src/runner/flutter_command.dart b/packages/flutter_tools/lib/src/runner/flutter_command.dart index b2f14f6227..6d8d87323d 100644 --- a/packages/flutter_tools/lib/src/runner/flutter_command.dart +++ b/packages/flutter_tools/lib/src/runner/flutter_command.dart @@ -160,15 +160,16 @@ abstract class FlutterCommand extends Command { } } + // Populate the cache. We call this before pub get below so that the sky_engine + // package is available in the flutter cache for pub to find. + await cache.updateAll(); + if (shouldRunPub) { int exitCode = await pubGet(); if (exitCode != 0) return exitCode; } - // Populate the cache. - await cache.updateAll(); - if (flutterUsage.isFirstRun) flutterUsage.printUsage();