update the cache earlier (#5415)

* update the cache earlier

* add documentation
This commit is contained in:
Devon Carew
2016-08-15 22:51:40 -07:00
committed by GitHub
parent 3dda629089
commit 2259c59be8

View File

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