fix: stop on an unreadable retrodeck manifest

The local manifest read printed a warning and left the component out
of retrodeck.yml with exit 0, where the remote read raises.
This commit is contained in:
Abdessamad Derraz committed 2026-11-21 19:50:10 +01:00
1 parent 1b7d30967b
commit 5a931ad4b1
2 files changed
+13 -2

No files matched your search

+5 -2
View File
@@ -448,11 +448,14 @@ class Scraper(BaseScraper):
mf = d / "component_manifest.json"
if not mf.exists():
continue
# Skipped with a warning, an unreadable manifest left its
# component's systems out of retrodeck.yml, exit code 0, where
# the remote read stops.
try:
with open(mf) as f:
manifests.append((d.name, json.load(f)))
except (json.JSONDecodeError, OSError) as e:
print(f" WARNING: {mf}: {e}", file=sys.stderr)
except json.JSONDecodeError as e:
raise ValueError(f"{mf}: not JSON: {e}") from e
return manifests
def component_file(self, path: str) -> str | None: