Commit aa66a772 authored by Devon Carew's avatar Devon Carew

fix an NPE when the flutter.yaml file is missing

parent 4e4887a9
...@@ -242,9 +242,11 @@ Future<_ApkComponents> _findApkComponents( ...@@ -242,9 +242,11 @@ Future<_ApkComponents> _findApkComponents(
components.debugKeystore = new File(artifactPaths[3]); components.debugKeystore = new File(artifactPaths[3]);
components.resources = new Directory(resources); components.resources = new Directory(resources);
await parseServiceConfigs(components.services, await parseServiceConfigs(
jars: components.jars, components.services,
androidSdk: components.androidSdk.path); jars: components.jars,
androidSdk: components.androidSdk.path
);
if (!components.resources.existsSync()) { if (!components.resources.existsSync()) {
// TODO(eseidel): This level should be higher when path is manually set. // TODO(eseidel): This level should be higher when path is manually set.
......
...@@ -29,7 +29,7 @@ Future parseServiceConfigs( ...@@ -29,7 +29,7 @@ Future parseServiceConfigs(
return; return;
dynamic manifest = _loadYamlFile(_kFlutterManifestPath); dynamic manifest = _loadYamlFile(_kFlutterManifestPath);
if (manifest['services'] == null) if (manifest == null || manifest['services'] == null)
return; return;
for (String service in manifest['services']) { for (String service in manifest['services']) {
......
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