mirror of
https://github.com/rehan-remade/universal-modder.git
synced 2026-11-05 01:37:40 +00:00
[PR #94] [MERGED] fix(win): find powershell.exe when it isn't on PATH #116
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rehan-remade/universal-modder#116
Loading…
Add table
Add a link
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/rehan-remade/universal-modder/pull/94
Author: @AltDoug
Created: 10/5/2026
Status: ✅ Merged
Merged: 10/6/2026
Merged by: @rehan-remade
Base:
main← Head:fix/powershell-full-path📝 Commits (1)
5e7af7ffix(win): find powershell.exe when it isn't on PATH📊 Changes
4 files changed (+32 additions, -7 deletions)
View changed files
📝
tests/test_um.py(+16 -0)📝
um/common.py(+13 -0)📝
um/scan.py(+2 -2)📝
um/win.py(+1 -5)📄 Description
um win ps,um win drive,um win recordand the Windows folder lookup inum scanstart PowerShell as barepowershell. On native Windows that only resolves ifSystem32\WindowsPowerShell\v1.0is on PATH. Agents often run with a trimmed PATH (e.g. Git Bash started by a terminal app), and then everyum wincommand dies with:Repro (Git Bash, any PATH without that folder):
Fix:
ps_exe()moves toum/common.py. It still prefers whatshutil.whichfinds, then falls back to%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe(/mnt/c/Windows/...under WSL).scan.win_folders()uses it too, so it no longer returns{}silently in the same case.Tests: new
test_ps_exe_falls_back_to_full_path(fails before, passes after); full suite 59 passed on Windows 11, Python 3.12. By hand:um win pscrashed under the trimmed PATH before the fix and lists windows after it.Found and fixed with AI assistance (Claude Code); the repro and the fix were run by hand on Windows 11.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.