Build.bat/Mods.bat: quote per-user Python paths, sync lookup, and add no-pause guard #2342
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!2342
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/win-launchers-bat-safety"
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?
Pull request successfully merged and closed
Claimed in the coordination issue as: WIN-LAUNCHERS-BUILD-MODS-BAT-QUOTING-USER-PYTHON-AND-NO-PAUSE (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7194337029)
What and why
Build.batandMods.batby splittingPYinto quotedPY_EXEandPY_ARG(set "PY_EXE=%~1", invoking"%PY_EXE%" %PY_ARG% -I ...) and quoting"%~1"in:try_pythonso per-user install paths containing spaces or&work without unquoted syntax errors.:find_user_pythonand:try_pythontoMods.bat(matchingBuild.bat) so per-user Python installs under%LOCALAPPDATA%\Programs\Python\Python3*work in the mod manager launcher as well.pausecalls in bothBuild.batandMods.batwithif not defined LEONIDA_NO_PAUSE pause, and addPYTMPfallbacks (%TEMP%->%LOCALAPPDATA%\Temp->%~dp0) inBuild.bat's:py_download.tests/test_win_launchers.py.Tested
python -I tests/test_win_launchers.py -v: 2 passed, 0 failed (detachedupstream/mainbaseline with only the new test file fails with 2 failures).python -I tests/test_ci_registration.py: 16 passed.python -I tests/test_text_write_line_endings.py: 3 passed.python -I scripts/check_no_game_data.py,python -I -m compileall -q tests/test_win_launchers.py, andgit diff --cached --check: passed.GPUs 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.#2342 | head 6f015d8345cfe90d32820ba686cdf234ba2113d7 (merged cleanly with main d48a957bb) |
python -I tests/test_win_launchers.py| red on main:FAILED (failures=2)(Build.batunquoted%1broke per-user Python paths containing&,Mods.batlacked:find_user_python, and neither launcher supportedLEONIDA_NO_PAUSE) | green on PR+main:2 tests OK| Windows 11 (10.0.26200.9974,cmd.exe+powershell.exe5.1.26100.9818), Python 3.12.10 | AI-assisted: yesAudited
Build.bat,Mods.bat, andtests/test_win_launchers.pyon Windows 11 (cmd.exe+powershell.exeAdd-TypeC# stubpython.exe), verifying splitPY_EXE/PY_ARGquoting ("%PY_EXE%" %PY_ARG% -I ...),:find_user_pythonper-user Python discovery under paths containing&(user & test\Programs\Python\Python313\python.exe),PYTMPfallback when%TEMP%is unset,LEONIDA_NO_PAUSEnon-interactive exit without blocking onpause, and exact exit-code propagation (0,5,1). Also verifiedtests/test_ci_registration.py(18 OK),tests/test_text_write_line_endings.py(3 OK), andscripts/check_no_game_data.py.Merged, thank you! Its own tests failed on main without the change and passed with it, and a batch test with eight other tool PRs (main's Python suite plus a game run on an RTX 5080) showed no regression.
AI-assisted (Claude Code, Claude Opus 5.5), on behalf of DadaCap.