fix: core probe through run_cli, documented

The probe skipped run_cli, accepted option prefixes in its shared options, left three options undocumented and was missing from the published schemas. The worker runs under -I, so the script directory is put back on sys.path before importing common.
This commit is contained in:
Abdessamad Derraz committed 2026-10-27 07:11:45 +01:00
1 parent e627f0cf49
commit cb5bb738cb
2 files changed
+8 -2

No files matched your search

+6 -2
View File
@@ -742,7 +742,7 @@ def build_parser() -> argparse.ArgumentParser:
formatter_class=argparse.RawDescriptionHelpFormatter,
fromfile_prefix_chars="@")
sub = parser.add_subparsers(dest="mode", required=True)
common = argparse.ArgumentParser(add_help=False, fromfile_prefix_chars="@")
common = argparse.ArgumentParser(add_help=False, allow_abbrev=False, fromfile_prefix_chars="@")
common.add_argument("--core", required=True, help="libretro .so to load")
common.add_argument("--content", help="content to load (a .cue is identified with its tracks)")
common.add_argument("--content-label", help="identity of the content, e.g. its Redump name")
@@ -976,4 +976,8 @@ def main(argv: Sequence[str] | None = None) -> int:
if __name__ == "__main__":
sys.exit(main())
# The worker runs under -I, which leaves the script directory off sys.path.
sys.path.insert(0, str(Path(__file__).resolve().parent))
from common import run_cli
run_cli(main)