fix: refuse --include-archived without --all

This commit is contained in:
Abdessamad Derraz committed 2026-10-06 12:26:47 +02:00
1 parent 4609102772
commit 0cc6ab5990
2 files changed
+11

No files matched your search

+4
View File
@@ -2480,6 +2480,10 @@ def _refuse_unapplied_flags(args, parser) -> None:
about an artifact the caller did not name. Run before any quick-exit
mode, since --verify-packs and --manifest-targets return early.
"""
# Only --all chooses among registered platforms; every other mode names
# its own platform, emulator, system or hash.
if args.include_archived and not args.all:
parser.error("--include-archived requires --all")
# Parsed before the quick-exit modes: --verify-packs returns early and
# still needs the region priority list to narrow its expectation.
args.regions = []
+7
View File
@@ -6011,6 +6011,13 @@ struct BurnDriver BurnDrvneogeo = {
(["--system", "sony-playstation"], ["--refresh-data"], "refuse"),
(["--from-md5", "d8f1"], ["--refresh-data"], "refuse"),
(["--platform", "retroarch", "--offline"], ["--refresh-data"], "refuse"),
# Only --all chooses among platforms, as verify.py already says.
(["--platform", "retroarch"], ["--include-archived"], "refuse"),
(["--emulator", "handy"], ["--include-archived"], "refuse"),
(["--system", "atari-lynx"], ["--include-archived"], "refuse"),
(["--from-md5", "d8f1"], ["--include-archived"], "refuse"),
(["--platform", "retroarch", "--verify-packs"], ["--include-archived"],
"refuse"),
]
for mode, flag, expected in matrix:
with self.subTest(mode=mode, flag=flag):