Skip to content

fix(installer): use User-scope PATH in Windows install instruction#1274

Merged
Aaronontheweb merged 3 commits into
netclaw-dev:devfrom
Aaronontheweb:claude-wt-windows-installer-path
Jun 1, 2026
Merged

fix(installer): use User-scope PATH in Windows install instruction#1274
Aaronontheweb merged 3 commits into
netclaw-dev:devfrom
Aaronontheweb:claude-wt-windows-installer-path

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Collaborator

Summary

  • Fix Windows installer PATH instruction that was corrupting User PATH by using $env:PATH (merged Machine+User) instead of User scope
  • Add smoke test assertions to prevent regression

Fixes #1072

Changes

scripts/install.ps1:

  • Changed printed PATH instruction to read User scope separately before modifying:
    $userPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
    [Environment]::SetEnvironmentVariable('PATH', "...;$userPath", 'User')
  • Added trailing backslash normalization for more reliable PATH detection

scripts/smoke/install-smoke.ps1:

  • Added assertions verifying the instruction does NOT use $env:PATH
  • Added assertions verifying the instruction reads from User scope

Test plan

  • Windows installer smoke test passes (scripts/smoke/install-smoke.ps1)
  • Manual verification: run installer on Windows, confirm printed instruction uses User scope

…etclaw-dev#1072)

The printed PATH instruction used $env:PATH, which is the merged
Machine+User PATH. Writing it back to User scope copies all Machine
entries into User scope, corrupting the User PATH and pushing it
toward the 8191-char limit.

Changed to read User scope separately before modifying:
  $userPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
  [Environment]::SetEnvironmentVariable('PATH', "...;$userPath", 'User')

Also added smoke test assertions to prevent regression.
@Aaronontheweb Aaronontheweb added the bug Something isn't working label Jun 1, 2026
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) June 1, 2026 12:56
@Aaronontheweb Aaronontheweb merged commit 40020c6 into netclaw-dev:dev Jun 1, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows installer prints a PATH-corrupting command (splices $env:PATH into User scope)

1 participant