mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 09:23:26 -05:00
fix: refuse a data key the platform does not use
Under --key the platform restriction was not applied, so dolphin-sys was downloaded again for RomM, which never reads it. A key whose platforms exclude the one named is now refused.
This commit is contained in:
1 parent
32d32e5718
commit
999a77a96a
2 files changed
+26
No files matched your search
@@ -544,6 +544,15 @@ def main() -> None:
|
||||
if args.key not in registry:
|
||||
log.error("unknown key: %s (available: %s)", args.key, ", ".join(registry))
|
||||
raise SystemExit(1)
|
||||
allowed = registry[args.key].get("for_platforms")
|
||||
if args.platform and allowed and args.platform not in allowed:
|
||||
# The platform restriction applied only without --key: dolphin-sys
|
||||
# was refreshed for RomM, which never reads it.
|
||||
log.error(
|
||||
"%s does not serve %s (for_platforms: %s)",
|
||||
args.key, args.platform, ", ".join(allowed),
|
||||
)
|
||||
raise SystemExit(2)
|
||||
outcomes = {
|
||||
args.key: refresh_entry(
|
||||
args.key, registry[args.key], force=args.force, dry_run=args.dry_run
|
||||
|
||||
Reference in new issue
Block a user