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();