Skip to content

Pin common and shim for Policies-then-Preferences lookup - #1501

Merged
coreybutler merged 1 commit into
mainfrom
chore/pin-policy-then-pref
Oct 28, 2026
Merged

coreybutler merged 1 commit into
mainfrom
chore/pin-policy-then-pref

Conversation

@coreybutler

Copy link
Copy Markdown
Collaborator

What

Pin common to 5006246 (nvm-windows/common#23) and shim to 82ccd5f (nvm-windows/shim#23).

Why

GPO/Intune writes Software\Policies. The shim used to read only Preferences for cooldown, LogExecutions, AutoUse, and several other ADMX keys. Lookup is now HKLM Policies, HKLM Preferences, HKCU Policies, HKCU Preferences. Machine policy still always wins. User nvm config still applies when nothing higher is set.

Testing

  • zig build test 43/43 on shim#23
  • go test preferences + settings on common#23 (HKCU policy ignored for security keys; HKLM policy wins; HKCU pref fallback still works)

Risk

Low. HKLM Policies already won for permission/V8/lifecycle. This extends that order to the remaining ADMX keys. HKCU Policies no longer beat HKLM Preferences (user GPO cannot override machine prefs). ADMX is machine-class, so that is the intended lock.

GPO/Intune ADMX values now win over machine preferences in the shim and CLI.

Signed-off-by: Corey Butler <[email protected]>
@coreybutler
coreybutler merged commit 3dca9ab into main Oct 28, 2026
5 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