Commit 386c3518 authored by Devon Carew's avatar Devon Carew

improve the failure mode when run from a non-flutter project

fix an issue where errors were printed twice
parent 477530f3
......@@ -6,3 +6,4 @@
build/
packages
pubspec.lock
.atom/
......@@ -192,6 +192,14 @@ class ArtifactStore {
}
}
static void ensureHasSkyEnginePackage() {
Directory skyEnginePackage = new Directory(path.join(packageRoot, 'sky_engine'));
if (!skyEnginePackage.existsSync()) {
stderr.writeln("Cannot locate the sky_engine package; did you include 'flutter' in your pubspec.yaml file?");
throw new ProcessExit(2);
}
}
static String _engineRevision;
static String get engineRevision {
......@@ -274,6 +282,7 @@ class ArtifactStore {
}
static Directory _getCacheDirForPlatform(String platform) {
ensureHasSkyEnginePackage();
Directory baseDir = _getBaseCacheDir();
// TODO(jamesr): Add support for more configurations.
String config = 'Release';
......
......@@ -144,7 +144,7 @@ class StartCommand extends StartCommandBase {
await Future.wait([
downloadToolchain(),
downloadApplicationPackagesAndConnectToDevices(),
]);
], eagerError: true);
bool poke = argResults['poke'];
bool clearLogs = argResults['clear-logs'];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment