run_mojo can't find ArtifactStore.packageRoot

The `run_mojo` command doesn't integrate with `FlutterCommand` and doesn't
understand how to download its toolchain components ahead of time. Eventually
we should teach `run_mojo` how to integrate with the `Toolchain` class, but
until then, we can fix the regression by eagerly setting
`ArtifactStore.packageRoot` again.

Fixes https://github.com/domokit/mojo/issues/475
This commit is contained in:
Adam Barth
2015-10-15 20:06:30 -07:00
parent db6a7abdca
commit 3c9c31332a

View File

@@ -102,11 +102,12 @@ class FlutterCommandRunner extends CommandRunner {
Logger.root.level = Level.FINE;
_globalResults = globalResults;
ArtifactStore.packageRoot = globalResults['package-root'];
return super.runCommand(globalResults);
}
List<BuildConfiguration> _createBuildConfigurations(ArgResults globalResults) {
ArtifactStore.packageRoot = globalResults['package-root'];
if (!FileSystemEntity.isDirectorySync(ArtifactStore.packageRoot)) {
String message = '${ArtifactStore.packageRoot} is not a valid directory.';
if (ArtifactStore.packageRoot == 'packages') {