Sanity check --local-build directory

Fixes https://github.com/flutter/engine/issues/1613
This commit is contained in:
Adam Barth
2015-10-19 09:52:56 -07:00
parent 1999db2973
commit 5670243b53

View File

@@ -129,8 +129,10 @@ class FlutterCommandRunner extends CommandRunner {
String realFlutterPath = flutterDir.resolveSymbolicLinksSync();
enginePath = path.dirname(path.dirname(path.dirname(path.dirname(realFlutterPath))));
if (enginePath == '/' || enginePath.isEmpty)
enginePath = null;
if (enginePath == '/' || enginePath.isEmpty || !FileSystemEntity.isDirectorySync(path.join(enginePath, 'out'))) {
_logging.severe('Unable to detect local build in $enginePath.\nDo you have a dependency override for the flutter package?');
exit(2);
}
}
List<BuildConfiguration> configs = <BuildConfiguration>[];