fix(init): use System PATH on Windows for correct priority#58
Merged
CalvinAllen merged 2 commits intomainfrom Dec 9, 2025
Merged
fix(init): use System PATH on Windows for correct priority#58CalvinAllen merged 2 commits intomainfrom
CalvinAllen merged 2 commits intomainfrom
Conversation
Contributor
Test Coverage Report - macos-arm64Total Coverage: Coverage by Package📊 Full HTML coverage report available in workflow artifacts |
Contributor
Test Coverage Report - linux-amd64Total Coverage: Coverage by Package📊 Full HTML coverage report available in workflow artifacts |
Contributor
Test Coverage Report - macos-amd64Total Coverage: Coverage by Package📊 Full HTML coverage report available in workflow artifacts |
Contributor
Test Coverage Report - windows-amd64Total Coverage: Coverage by Package📊 Full HTML coverage report available in workflow artifacts |
Contributor
Test Coverage Report - windows-arm64Total Coverage: Coverage by Package📊 Full HTML coverage report available in workflow artifacts |
Windows combines PATH as System + User, meaning system installations always take priority. This fix modifies System PATH instead of User PATH to ensure dtvem shims take priority over system-level installations. Changes: - Modify System PATH (HKLM) instead of User PATH (HKCU) on Windows - Check for admin privileges before attempting modification - Prompt for UAC elevation if not already elevated - Use ShellExecute with "runas" verb to re-launch with elevation - Detect if shims already exist but not at beginning and offer to fix - Simplify init.go to delegate all PATH logic to AddToPath Unix/macOS behavior unchanged (prepend to shell config files). Fixes #55 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
8a33ce0 to
c691266
Compare
CalvinAllen
added a commit
that referenced
this pull request
Dec 9, 2025
fix(init): use System PATH on Windows for correct priority
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Windows combines PATH as System + User, meaning system installations always take priority over user PATH entries. This fix modifies System PATH instead of User PATH to ensure dtvem shims take priority over system-level installations (e.g.,
C:\Program Files\nodejs).Changes
ShellExecutewith "runas" verb to re-launch with elevationinit.goto delegate all PATH logic toAddToPathUnix/macOS behavior unchanged (prepend to shell config files).
Test plan
dtvem initas non-admin - should prompt for elevationdtvem initagain - should report already configuredFixes #55
🤖 Generated with Claude Code