mirror of
https://github.com/rehan-remade/universal-modder.git
synced 2026-11-05 01:37:40 +00:00
[PR #101] [MERGED] fix(hooks): add-to-path writes a POSIX root on Windows #125
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#125
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/101
Author: @AltDoug
Created: 10/6/2026
Status: ✅ Merged
Merged: 10/6/2026
Merged by: @rehan-remade
Base:
main← Head:fix/hook-path-windows📝 Commits (1)
7ae20fbfix(hooks): add-to-path writes a POSIX root on Windows📊 Changes
2 files changed (+20 additions, -0 deletions)
View changed files
📝
hooks/add-to-path.sh(+2 -0)📝
tests/test_um.py(+18 -0)📄 Description
On Windows, Claude Code passes
${CLAUDE_PLUGIN_ROOT}to the SessionStart hook as a drive path (C:/Users/.../universal-modder/0.2.0).hooks/add-to-path.shwrites it intoCLAUDE_ENV_FILEas is:Bash splits PATH on
:, so that becomes two dead entries,Cand/Users/.../bin. You can see them at the top ofecho $PATHin every session.umstill works only because Claude Code also adds the plugin'sbin/to PATH by itself.Fix: when
cygpathexists (Git Bash / MSYS), convert the root withcygpath -ufirst. Elsewhere nothing changes.Tests: new
test_path_hook_writes_a_posix_root(skipped where there's nocygpath; fails before, passes after on Windows); full suite 59 passed on Windows 11, Python 3.12. By hand: the hook given aC:/...root now writesexport PATH="/.../bin:$PATH", and sourcing it makesumresolve.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.