fix: count listed systems in the --system hint

A mistyped --system said '--list-systems lists all 579' and the listing
prints 532: the hint counted every spelling across profiles, and
system_index merges the ones that differ in case or separator before
printing. Both verify.py and generate_pack.py now pass that count to
suggest_names, whose listed parameter exists for this case.
This commit is contained in:
Abdessamad Derraz committed 2026-11-06 14:55:40 +01:00
1 parent c9e5ea67e7
commit de8f20f409
3 files changed
+34 -2

No files matched your search

+5 -1
View File
@@ -43,6 +43,7 @@ from common import (
require_directory,
target_listing_line,
suggest_names,
system_index,
require_platform,
load_target_config,
archive_entry,
@@ -2059,7 +2060,10 @@ def generate_system_pack(
f"No emulators found for system(s): {', '.join(system_ids)}",
file=sys.stderr,
)
print(suggest_names(system_ids, sorted(all_systems), "--list-systems"),
# --list-systems merges spellings that differ in case or separator:
# the hint counted 579 spellings for the 532 lines it prints.
print(suggest_names(system_ids, sorted(all_systems), "--list-systems",
listed=len(system_index(profiles))),
file=sys.stderr)
return None
+5 -1
View File
@@ -43,6 +43,7 @@ from common import (
platform_arg,
target_listing_line,
suggest_names,
system_index,
require_platform,
archive_entry,
archive_is_optional,
@@ -2611,7 +2612,10 @@ def verify_system(
f"No emulators found for system(s): {', '.join(system_ids)}",
file=sys.stderr,
)
print(suggest_names(system_ids, sorted(all_systems), "--list-systems"),
# --list-systems merges spellings that differ in case or separator:
# the hint counted 579 spellings for the 532 lines it prints.
print(suggest_names(system_ids, sorted(all_systems), "--list-systems",
listed=len(system_index(profiles))),
file=sys.stderr)
sys.exit(1)