mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Handle legacy "system": "all" for package manifest
This commit is contained in:
@ -79,7 +79,7 @@ class PkgRepoMixin(object):
|
||||
|
||||
@staticmethod
|
||||
def is_system_compatible(valid_systems):
|
||||
if valid_systems in (None, "all", "*"):
|
||||
if not valid_systems or "*" in valid_systems:
|
||||
return True
|
||||
if not isinstance(valid_systems, list):
|
||||
valid_systems = list([valid_systems])
|
||||
|
@ -537,7 +537,7 @@ class PackageJsonManifestParser(BaseManifestParser):
|
||||
def _parse_system(data):
|
||||
if "system" not in data:
|
||||
return data
|
||||
if data["system"] in ("*", ["*"]):
|
||||
if data["system"] in ("*", ["*"], "all"):
|
||||
del data["system"]
|
||||
return data
|
||||
if not isinstance(data["system"], list):
|
||||
|
@ -479,6 +479,11 @@ def test_package_json_schema():
|
||||
)
|
||||
assert "system" not in mp.as_dict()
|
||||
|
||||
mp = parser.ManifestParserFactory.new(
|
||||
'{"system": "all"}', parser.ManifestFileType.PACKAGE_JSON
|
||||
)
|
||||
assert "system" not in mp.as_dict()
|
||||
|
||||
mp = parser.ManifestParserFactory.new(
|
||||
'{"system": "darwin_x86_64"}', parser.ManifestFileType.PACKAGE_JSON
|
||||
)
|
||||
|
Reference in New Issue
Block a user