forked from platformio/platformio-core
Skip broken example definitions in package manifest
This commit is contained in:
@ -186,8 +186,8 @@ class BaseManifestParser(object):
|
|||||||
or not isinstance(examples, list)
|
or not isinstance(examples, list)
|
||||||
or not all(isinstance(v, dict) for v in examples)
|
or not all(isinstance(v, dict) for v in examples)
|
||||||
):
|
):
|
||||||
examples = None
|
data["examples"] = None
|
||||||
if not examples and self.package_dir:
|
if not data["examples"] and self.package_dir:
|
||||||
data["examples"] = self.parse_examples_from_dir(self.package_dir)
|
data["examples"] = self.parse_examples_from_dir(self.package_dir)
|
||||||
if "examples" in data and not data["examples"]:
|
if "examples" in data and not data["examples"]:
|
||||||
del data["examples"]
|
del data["examples"]
|
||||||
|
@ -39,6 +39,7 @@ def test_library_json_parser():
|
|||||||
"build": {
|
"build": {
|
||||||
"flags": ["-DHELLO"]
|
"flags": ["-DHELLO"]
|
||||||
},
|
},
|
||||||
|
"examples": ["examples/*/*.pde"],
|
||||||
"customField": "Custom Value"
|
"customField": "Custom Value"
|
||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user