-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
On Windows, the dtvem init command adds the shims directory to the User PATH. However, Windows combines PATH as System PATH + User PATH, meaning system installations (like C:\Program Files\nodejs) always take priority over dtvem shims.
This causes dtvem-managed versions to never be used when a system-level installation exists.
Root Cause
- Windows PATH order: System PATH comes before User PATH
- PowerShell 7 also prepends
$PSHOMEand reconstructs PATH with System before User - Adding to User PATH will never take priority over System PATH entries
Solution
- Add shims to System PATH instead of User PATH
- This requires administrator privileges
- Prompt user for UAC elevation when needed
- Re-launch
dtvem initwith elevation to make the change
Acceptance Criteria
-
dtvem initmodifies System PATH on Windows (not User PATH) - Prompts for admin elevation if not already elevated
- Uses ShellExecute with "runas" verb for UAC prompt
- Works correctly when already elevated
- Unix/macOS behavior unchanged (prepend to shell config)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working