mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-10 13:33:24 -05:00
fix: refuse flags verify-packs cannot honour
This commit is contained in:
1 parent
fca005f6db
commit
a4455ef6a7
2 files changed
+26
No files matched your search
@@ -2421,6 +2421,19 @@ def main():
|
||||
# Quick-exit modes: --verify-packs alone = verify existing packs only
|
||||
# Combined with --all-variants, generation runs first then verify
|
||||
if args.verify_packs and not args.all_variants:
|
||||
# This mode checks packs already on disk against the platform's own
|
||||
# list. It reads the region priority above and nothing else, so a
|
||||
# narrowing flag it cannot honour is refused rather than dropped: a
|
||||
# dropped flag answers about an artifact the caller did not name, and
|
||||
# an unknown target name reads as accepted.
|
||||
for flag, given in (
|
||||
("--target", args.target),
|
||||
("--one-per-slot", args.one_per_slot),
|
||||
("--required-only", args.required_only),
|
||||
("--source", args.source != "full"),
|
||||
):
|
||||
if given:
|
||||
parser.error(f"{flag} is incompatible with --verify-packs")
|
||||
with _pack_output_lock(args.output_dir, exclusive=False):
|
||||
_run_verify_packs(args)
|
||||
return
|
||||
|
||||
@@ -5814,6 +5814,19 @@ struct BurnDriver BurnDrvneogeo = {
|
||||
"refuse"),
|
||||
(["--platform", "retroarch", "--from-md5", "d8f1"], ["--one-per-slot"],
|
||||
"refuse"),
|
||||
# --verify-packs returns before the argument checks run, so it used
|
||||
# to accept all four of these -- an unknown target name included --
|
||||
# and answer about the pack sitting in the output directory.
|
||||
(["--platform", "retroarch", "--verify-packs"], ["--target", "switch"],
|
||||
"refuse"),
|
||||
(["--platform", "retroarch", "--verify-packs"], ["--target", "no-such-xyz"],
|
||||
"refuse"),
|
||||
(["--platform", "retroarch", "--verify-packs"], ["--one-per-slot"],
|
||||
"refuse"),
|
||||
(["--platform", "retroarch", "--verify-packs"], ["--required-only"],
|
||||
"refuse"),
|
||||
(["--platform", "retroarch", "--verify-packs"], ["--source", "truth"],
|
||||
"refuse"),
|
||||
]
|
||||
for mode, flag, expected in matrix:
|
||||
with self.subTest(mode=mode, flag=flag):
|
||||
|
||||
Reference in new issue
Block a user