mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix issue with library.properties manifest parser when author email is not specified
This commit is contained in:
@ -480,7 +480,7 @@ class LibraryPropertiesManifestParser(BaseManifestParser):
|
||||
continue
|
||||
found = True
|
||||
item["maintainer"] = True
|
||||
if not item.get("email"):
|
||||
if not item.get("email") and email:
|
||||
item["email"] = email
|
||||
if not found:
|
||||
authors.append(
|
||||
|
@ -161,6 +161,7 @@ customField=Custom Value
|
||||
"architectures=*\n" + contents
|
||||
).as_dict()
|
||||
assert data["platforms"] == ["*"]
|
||||
|
||||
# Platforms specific
|
||||
data = parser.LibraryPropertiesManifestParser(
|
||||
"architectures=avr, esp32\n" + contents
|
||||
@ -184,7 +185,7 @@ customField=Custom Value
|
||||
"type": "git",
|
||||
}
|
||||
|
||||
# Hope page
|
||||
# Home page
|
||||
data = parser.LibraryPropertiesManifestParser(
|
||||
"url=https://github.com/username/reponame.git\n" + contents
|
||||
).as_dict()
|
||||
@ -193,6 +194,17 @@ customField=Custom Value
|
||||
"url": "https://github.com/username/reponame.git",
|
||||
}
|
||||
|
||||
# Author + Maintainer
|
||||
data = parser.LibraryPropertiesManifestParser(
|
||||
"""
|
||||
author=Rocket Scream Electronics
|
||||
maintainer=Rocket Scream Electronics
|
||||
"""
|
||||
).as_dict()
|
||||
assert data["authors"] == [
|
||||
{"name": "Rocket Scream Electronics", "maintainer": True}
|
||||
]
|
||||
|
||||
|
||||
def test_library_json_schema():
|
||||
contents = """
|
||||
|
Reference in New Issue
Block a user