Skip to content

fix(cli): put expanded LocalAppData .nodejs on HKCU PATH - #20

Merged
coreybutler merged 1 commit into
mainfrom
feat/hkcu-expanded-nodejs-path
Oct 26, 2026
Merged

coreybutler merged 1 commit into
mainfrom
feat/hkcu-expanded-nodejs-path

Conversation

@coreybutler

Copy link
Copy Markdown
Contributor

What

  • Prepend expanded %LOCALAPPDATA%\Author Software\nvm\.nodejs on HKCU Path during bootstrap and --remove-legacy-user-env.
  • Drop the unexpanded %LOCALAPPDATA% form. Skip empty or service-profile LocalAppData.
  • Snapshot/restore HKCU Environment in the legacy-payload bootstrap test.

Why

Electron copies PATH without expanding %LOCALAPPDATA%. Integrated terminals then cannot find node/npm even when nvm works. Machine PATH stays unexpanded for every user. HKCU gets the expanded LocalAppData path the installer already forces (NVM4100 / /DIR ignored).

Testing

  • go test ./bootstrap
  • Canonical LocalAppData root unit tests (service profile and empty LocalAppData skip)

Risk

Low. Writes HKCU Path only. Does not change program root, InstallRoot, or machine PATH.

Electron copies PATH without expanding %LOCALAPPDATA%, so
integrated terminals cannot find node/npm. Write only
%LOCALAPPDATA%\Author Software\nvm\.nodejs.

Signed-off-by: Corey Butler <[email protected]>
@coreybutler
coreybutler merged commit 8bc41e1 into main Oct 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant