PREFLIGHT-TOOL-AVAILABLE-SPACES: parse quoted paths with spaces in make_game.tool_available #482
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!482
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/482/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@xroneyaa on GitHub · 2026-11-24 06:10 UTC · original
xroneyaa:fix/make-game-tool-available-spaces→main· +19 −5 · 2 files · 1 commits · merged 2026-11-25 21:23 UTCClaimed in the coordination issue as: PREFLIGHT-TOOL-AVAILABLE-SPACES
What and why
make_game.tool_available()previously stripped outer quotes and split on whitespace (cmd.split()[0]). When passed a quoted path containing spaces plus arguments (such as"C:\Program Files\Python312\python.exe" -I), it split at the first space (C:\Program) and reported an available tool as missing, failingToolchainDetectionTest.test_tool_available_command_with_argumentson Windows systems where Python is installed underProgram Files.This reuses
tools/mc_command.py'ssplit_command()so quoted paths with spaces and arguments resolve to their executable path, unquoted paths with spaces still resolve viaos.path.isfile(), and unmatched quotes returnFalsewithout raisingSystemExit. Added space-in-path and unmatched-quote regression tests intests/test_make_game_preflight.py.Tested
python -I -m compileall -q make_game.py tests-> exit 0python -I tests/test_make_game_preflight.py-> Ran 100 tests, OK (skipped=1)python -I tests/test_make_game_argparse.py-> Ran 38 tests, OKpython -I tests/test_text_write_line_endings.py-> Ran 3 tests, OKpython -I scripts/check_no_game_data.py make_game.py tests/test_make_game_preflight.py-> exit 0GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed (n/a — no translator rule added).@PierreEbele on GitHub · 2026-11-24 20:56 UTC · original
Reviewed
2c03f29: ran tests/test_make_game_preflight.py on the PR (Ran 100 tests,OK (skipped=1)) and copied onto main, where it fails only on the new quoted-path-with-arguments assertion (Falseon main,Trueon the PR; the unmatched-quote test passes on both and guardssplit_command'sSystemExit). tests/test_make_game_argparse.py passes on both trees (38 tests,OK (skipped=1)). Differential probes show no regressions: on Linux, single-quoted paths and escaped spaces also flipFalse -> Truewhile malformed/unclosed-quote inputs flipTrue -> False(matchingsplit_command), and mockingos.name == "nt"exercises the MSVC path cleanly (native Windows still untested). tests/test_mc_command.py has 2 identical failures on plain main (sandbox/tmpnoexec), unrelated to this PR. AI-assisted review.@DeadlyChirp on GitHub · 2026-11-25 15:11 UTC · original
Tested on Windows 11, Python 3.12.10 (venv under
D:\GTA 6 TEMP\venv, a path with spaces). I merged2c03f2978onto upstream main (merge commit eab4a9f99).python -I tests/test_make_game_preflight.py: 100 tests OK (2 skipped). On main,test_tool_available_command_with_argumentsfails here withAssertionError: False is not true, becausesys.executablehas a space.make_game.tool_available(...):"D:\GTA 6 TEMP\venv\Scripts\python.exe" -I"D:\nope dir\x.exe" -I(missing)E:/dev/mamba/llvm/Library/bin/llvm-mc.exeLGTM from the Windows side.
(AI-assisted test run; output checked by hand.)
@aslan2142 on GitHub · 2026-11-25 21:23 UTC · original
Merged, thanks! The new test fails on
mainand passes with this.main2b78ecb22+2c03f2978: the semantic suite passes (491 files, 6,312 tests, 0 files failed);test_make_game_preflightpass; the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 2 changed files.AI-assisted (Claude Code, Claude Opus 5.5).