scripts: --help answers in the Python and shell entry points #2966

Manually merged
github merged 2 commits from github-bot/gh-2966 into gh-pr/2966/base 2026-12-02 00:58:31 +00:00 AGit
Owner

@⁠aznohonza on GitHub · 2026-12-01 21:55 UTC · original
aznohonza:scripts/entry-point-help → main · +79 −2 · 8 files · 2 commits · merged 2026-12-02 00:56 UTC

Re-created from the original #2853. aznohonza/mandy-contrib was made private at 21:41 UTC on 2026-12-01, which detached the fork and permanently closed its pull requests; GitHub refuses to reopen them (422 state cannot be changed). Same branch, same head 6da607c0968fd3b6bce7193ea58fc30e585aabc5. The original review thread is at #2853.
This head also carries 1228aad13, the two review nits: -h coverage in test_run_wine_session and test_check_no_game_data, and LEONIDA_GAME_DIR in play-linux.sh usage.


Claimed in the coordination issue as: ENTRY-POINT-HELP-PY-SH

What and why

KelboLive's 06:36 finding lists entry points that cannot produce help. This is the Python and shell part; the three PowerShell build scripts are ecox982745's BUILD-POWERSHELL-HELP-ONLY claim, so the two are disjoint.

  • scripts/check_no_game_data.py --help treated --help as a path and answered cannot read --help, exit 2 — in the tool every contributor is told to run. It now prints the usage text its module docstring already carries and exits 0. Every other argument is still a path, and the exit codes (1: game data found, 2: unreadable input) are unchanged.
  • scripts/play-linux.sh --help answered No --help, exit 1. It now prints its usage — the game executable, --series-x, and the LEONIDA_* variables that choose the runtime, the bundled VKD3D-Proton, the prefix, the caches and the saves — and exits 0 without touching Wine. No argument still prints the same usage, on stderr, exit 2, as before.
  • scripts/run_wine_session.sh --help exited 1 on the missing WINEPREFIX. It now prints its usage and exits 0 before that check.
  • scripts/run_game_wine.sh's one-line Usage: line omitted the required --shaders; its Inputs section already listed it, and a run without it is refused. The line names it now.

Left out on purpose: compute_workers_win.py is an internal parent/worker adapter, silent by design, and smooth-motion.ps1 plus game-gate.ps1's -Verb values are PowerShell, which this machine has no pwsh to run.

Tested

  • python -I tests/test_check_no_game_data.py 22 pass, tests/test_run_game_wine.py 9, tests/test_run_wine_session.py 5, tests/test_run_game_wine_safety.py 3, tests/test_leonida_launcher.py 15, and the new tests/test_play_linux.py 1.
  • Red before green: with the four scripts at main and only the tests changed, each new test fails — test_play_linux.py 2, test_run_wine_session.py 1, test_check_no_game_data.py 1, test_run_game_wine.py 1 — and all pass with the scripts.
  • By hand: python3 -I scripts/check_no_game_data.py --help, sh scripts/play-linux.sh --help and bash scripts/run_wine_session.sh --help print their usage and exit 0; bash scripts/run_game_wine.sh --help's first line now names --shaders.
  • sh -n on play-linux.sh, bash -n on run_wine_session.sh and run_game_wine.sh, and python3 -I scripts/check_no_game_data.py on all eight changed files is clean.

No game files, no game data, no GPU and no Wine; every path above is a synthetic argument list or an empty temporary folder.

GPUs tested: none needed (tools only).

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption.
  • A new translator rule is in the contract table of docs/design.md. (n/a: tools help only)
**@⁠aznohonza** on GitHub · 2026-12-01 21:55 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2966) `aznohonza:scripts/entry-point-help` → `main` · +79 −2 · 8 files · 2 commits · merged 2026-12-02 00:56 UTC Re-created from the original #2853. `aznohonza/mandy-contrib` was made private at 21:41 UTC on 2026-12-01, which detached the fork and permanently closed its pull requests; GitHub refuses to reopen them (`422 state cannot be changed`). Same branch, same head `6da607c0968fd3b6bce7193ea58fc30e585aabc5`. The original review thread is at #2853. This head also carries `1228aad13`, the two review nits: `-h` coverage in `test_run_wine_session` and `test_check_no_game_data`, and `LEONIDA_GAME_DIR` in `play-linux.sh` usage. --- Claimed in the coordination issue as: [ENTRY-POINT-HELP-PY-SH](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570) ### What and why [KelboLive's 06:36 finding](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570) lists entry points that cannot produce help. This is the Python and shell part; the three PowerShell build scripts are [ecox982745's `BUILD-POWERSHELL-HELP-ONLY` claim](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/2570), so the two are disjoint. - `scripts/check_no_game_data.py --help` treated `--help` as a path and answered `cannot read --help`, exit 2 — in the tool every contributor is told to run. It now prints the usage text its module docstring already carries and exits 0. Every other argument is still a path, and the exit codes (1: game data found, 2: unreadable input) are unchanged. - `scripts/play-linux.sh --help` answered `No --help`, exit 1. It now prints its usage — the game executable, `--series-x`, and the `LEONIDA_*` variables that choose the runtime, the bundled VKD3D-Proton, the prefix, the caches and the saves — and exits 0 without touching Wine. No argument still prints the same usage, on stderr, exit 2, as before. - `scripts/run_wine_session.sh --help` exited 1 on the missing `WINEPREFIX`. It now prints its usage and exits 0 before that check. - `scripts/run_game_wine.sh`'s one-line `Usage:` line omitted the required `--shaders`; its Inputs section already listed it, and a run without it is refused. The line names it now. Left out on purpose: `compute_workers_win.py` is an internal parent/worker adapter, silent by design, and `smooth-motion.ps1` plus `game-gate.ps1`'s `-Verb` values are PowerShell, which this machine has no `pwsh` to run. ### Tested - `python -I tests/test_check_no_game_data.py` 22 pass, `tests/test_run_game_wine.py` 9, `tests/test_run_wine_session.py` 5, `tests/test_run_game_wine_safety.py` 3, `tests/test_leonida_launcher.py` 15, and the new `tests/test_play_linux.py` 1. - Red before green: with the four scripts at `main` and only the tests changed, each new test fails — `test_play_linux.py` 2, `test_run_wine_session.py` 1, `test_check_no_game_data.py` 1, `test_run_game_wine.py` 1 — and all pass with the scripts. - By hand: `python3 -I scripts/check_no_game_data.py --help`, `sh scripts/play-linux.sh --help` and `bash scripts/run_wine_session.sh --help` print their usage and exit 0; `bash scripts/run_game_wine.sh --help`'s first line now names `--shaders`. - `sh -n` on `play-linux.sh`, `bash -n` on `run_wine_session.sh` and `run_game_wine.sh`, and `python3 -I scripts/check_no_game_data.py` on all eight changed files is clean. No game files, no game data, no GPU and no Wine; every path above is a synthetic argument list or an empty temporary folder. GPUs tested: none needed (tools only). AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption. - [x] A new translator rule is in the contract table of `docs/design.md`. (n/a: tools help only)
check_no_game_data.py read `--help` as a path and answered "cannot read --help", exit 2, in the tool every
contributor is told to run; it now prints the usage text it already carries and exits 0. play-linux.sh and
run_wine_session.sh print their usage before any environment check, where they used to answer with an error
(and play-linux.sh's no-argument case still prints the same usage, on stderr, exit 2).

run_game_wine.sh's one-line Usage line names the required --shaders, which its Inputs section already listed.

A test per script fails on main's copies and passes here.
Dropping -h from run_wine_session.sh or check_no_game_data.py now fails the
test that covers it, and play-linux.sh's usage lists LEONIDA_GAME_DIR with
the other path variables (it already honours it).

AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 21:59:16 +00:00
Author
Owner

@⁠KelboLive on GitHub · 2026-12-01 22:19 UTC · original · reviewed

This one changed since #2853: 1228aad13 fixes both nits I raised — -h is now covered in both shell tests, and play-linux.sh's usage names LEONIDA_GAME_DIR. Under WSL the suites are green (play_linux 1/1, run_wine_session 5/5, check_no_game_data 22/22), merge-tree is clean and keeps main's --cache default. Good to merge.

**@⁠KelboLive** on GitHub · 2026-12-01 22:19 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2966#pullrequestreview-6141173013) · **reviewed** This one changed since #2853: `1228aad13` fixes both nits I raised — `-h` is now covered in both shell tests, and `play-linux.sh`'s usage names `LEONIDA_GAME_DIR`. Under WSL the suites are green (play_linux 1/1, run_wine_session 5/5, check_no_game_data 22/22), `merge-tree` is clean and keeps main's `--cache` default. Good to merge.
Author
Owner

@⁠aznohonza on GitHub · 2026-12-01 22:28 UTC · original

Thanks for the re-check and the WSL run — that matches the three suites here (play_linux 1/1, run_wine_session 5/5, check_no_game_data 22/22), and 1228aad13 is the head. Nothing else on my side.

AI-assisted.

**@⁠aznohonza** on GitHub · 2026-12-01 22:28 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/2966#issuecomment-7327902998) Thanks for the re-check and the WSL run — that matches the three suites here (play_linux 1/1, run_wine_session 5/5, check_no_game_data 22/22), and `1228aad13` is the head. Nothing else on my side. AI-assisted.
github-bot changed target branch from main to gh-pr/2966/base 2026-12-02 00:58:11 +00:00
github manually merged commit 1228aad135 into gh-pr/2966/base 2026-12-02 00:58:31 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!2966
No description provided.