[PR #979] mc_command: PATHEXT fallback for extensionless paths with spaces (OLD-9856) #1015

Open
opened 2026-11-26 20:19:48 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/979
Author: @OlaiFG7
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: carry/old-9856-mc-command-pathext


📝 Commits (2)

  • c580e03 tools/mc_command: check PATHEXT on Windows when shutil.which misses path without extension
  • fa55e7e tests/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

Claimed in the coordination issue as: OLD-9856 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7136904224)

What and why

Carries old-pr/9856 (draft #121) forward, rebased on main, keeping the original author's commits (lordon1a).

tools/mc_command.split_command: when a path with a directory part has no extension (C:\Program Files\LLVM\bin\llvm-mc) and shutil.which misses it (Python before 3.12 on Windows does not apply PATHEXT there), fall back to raw + PATHEXT on Windows so the path is not split at its spaces. Adds a mocked cross-platform test.

Tested

python -I tests/test_mc_command.py: 30 tests OK (7 skipped); python -m compileall -q make_game.py tools tests OK. Windows 11, CPU only.

GPUs tested: n/a

AI-assisted: yes (Claude Code carried the branch over)

Checklist

  • Based on current main and merges cleanly
  • One topic
  • No game data, keys or decryption
  • Not a translator rule

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/979 **Author:** [@OlaiFG7](https://github.com/OlaiFG7) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `carry/old-9856-mc-command-pathext` --- ### 📝 Commits (2) - [`c580e03`](https://github.com/ubiquitarianism/leonida/commit/c580e0347db3694bbbe9a285b025073e69eeeaa1) tools/mc_command: check PATHEXT on Windows when shutil.which misses path without extension - [`fa55e7e`](https://github.com/ubiquitarianism/leonida/commit/fa55e7e1ee82c673a82ca8871188f217015a53ab) tests/mc_command: add cross-platform PATHEXT fallback test and clarify comment ### 📊 Changes **2 files changed** (+19 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_mc_command.py` (+10 -0) 📝 `tools/mc_command.py` (+9 -2) </details> ### 📄 Description Claimed in the coordination issue as: OLD-9856 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7136904224) ### What and why Carries `old-pr/9856` (draft #121) forward, rebased on `main`, keeping the original author's commits (lordon1a). `tools/mc_command.split_command`: when a path with a directory part has no extension (`C:\Program Files\LLVM\bin\llvm-mc`) and `shutil.which` misses it (Python before 3.12 on Windows does not apply `PATHEXT` there), fall back to `raw + PATHEXT` on Windows so the path is not split at its spaces. Adds a mocked cross-platform test. ### Tested `python -I tests/test_mc_command.py`: 30 tests OK (7 skipped); `python -m compileall -q make_game.py tools tests` OK. Windows 11, CPU only. GPUs tested: n/a AI-assisted: yes (Claude Code carried the branch over) ### Checklist - [ ] Based on current `main` and merges cleanly - [x] One topic - [x] No game data, keys or decryption - [x] Not a translator rule 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#1015
No description provided.