mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:35:52 +01:00
[PR #121] [CLOSED] tools/mc_command: check PATHEXT on Windows when shutil.which misses path without extension #173
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#173
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/121
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/9856📝 Commits (2)
ed833a9tools/mc_command: check PATHEXT on Windows when shutil.which misses path without extension4342513tests/mc_command: add cross-platform PATHEXT fallback test and clarify comment📊 Changes
2 files changed (+19 additions, -2 deletions)
View changed files
📝
tests/test_mc_command.py(+10 -0)📝
tools/mc_command.py(+9 -2)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Claim: https://github.com/ProjectLeonida/Leonida/issues/9677#issuecomment-7116717748
What and why
On Windows with Python 3.11,
shutil.which(raw)returnsNonefor a path that contains a directory separator and omits its.exeextension (e.g.,C:\Program Files\LLVM\bin\llvm-mc), causingmc_command.split_command()to split on spaces and failingtests/test_mc_command.py(test_real_path_with_spaces_and_no_extension).Falls back to checking
os.path.isfile(raw + ext)acrossPATHEXTonos.name == "nt"whenshutil.which(raw)returnsNone.Verification (Windows 11 Home 26H2, CPython 3.11.9, CPU only, no game files)
2d53a8055):python -I tests/test_mc_command.py-> FAIL (1 failure:test_real_path_with_spaces_and_no_extension).python -I tests/test_mc_command.py -v-> 20/20 tests OK in 1.832s.python -I scripts/check_no_game_data.py tools/mc_command.py: clean (rc=0).git diff --check: clean (rc=0).AI-assisted.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.