mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: refuse --full-narrowings without full pack
This commit is contained in:
1 parent
46c651f0b0
commit
a6d7c92900
2 files changed
+7
-1
No files matched your search
+5
-1
@@ -816,7 +816,7 @@ def _refuse_unapplied_flags(
|
||||
|
||||
--all-variants builds every source itself, so a --source beside it is
|
||||
dropped; --skip-packs builds none, so both are, and step 5 does not run
|
||||
for --full-narrowings to widen.
|
||||
for --full-narrowings to widen, nor does it without a full pack.
|
||||
"""
|
||||
# --source defaults to None so a typed `--source full` is seen: compared
|
||||
# with its default value, it went through beside the modes that refuse it.
|
||||
@@ -829,6 +829,10 @@ def _refuse_unapplied_flags(
|
||||
("--full-narrowings", args.full_narrowings)):
|
||||
if on:
|
||||
parser.error(f"{flag} is incompatible with --skip-packs")
|
||||
# Step 5 compares the full pack, and --source platform or truth builds
|
||||
# none: the comparison is skipped and the flag had no effect.
|
||||
if args.full_narrowings and source_given and args.source != "full":
|
||||
parser.error(f"--full-narrowings is incompatible with --source {args.source}")
|
||||
if args.source is None:
|
||||
args.source = "full"
|
||||
|
||||
|
||||
@@ -4185,6 +4185,8 @@ class EveryToolRefusesAFlagItWouldDrop(unittest.TestCase):
|
||||
["--offline", "--all-variants", "--source", "platform"],
|
||||
["--offline", "--all-variants", "--source", "full"],
|
||||
["--offline", "--skip-packs", "--source", "full"],
|
||||
["--offline", "--source", "truth", "--full-narrowings"],
|
||||
["--offline", "--source", "platform", "--full-narrowings"],
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user