Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: RegistryKeyUtility.GetValueFromRegistryKey() has unused parameter, leading to incorrect results #11407

Closed
dominoFire opened this issue Nov 22, 2021 · 0 comments · Fixed by NuGet/NuGet.Client#4346
Assignees
Labels
Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Product:NuGet.exe NuGet.exe Type:Bug

Comments

@dominoFire
Copy link
Contributor

dominoFire commented Nov 22, 2021

NuGet Product Used

NuGet.exe

Product Version

6.0

Worked before?

No

Impact

It bothers me. A fix would be nice

Repro Steps & Context

By taking a look at RegistryKeyUtility code, there's an unused parameter called registryKeyPath

https://github.com/NuGet/NuGet.Client/blob/a8b6b1fb3a1bccd207a83612cd0f5e1f4ff1d0b8/src/NuGet.Clients/NuGet.CommandLine/RegistryKeyUtility.cs#L12

This leads to incorrect registry key readings.

With those incorrect registry key readings, nuget.exe cannot print correct warning messages when Long Path Support is enabled.

Also, the registry key checks runs on code that should only run on Windows Environments.

Verbose Logs

No response

@dominoFire dominoFire self-assigned this Nov 23, 2021
@dominoFire dominoFire added this to the Sprint 2021-11 milestone Nov 23, 2021
@nkolev92 nkolev92 added Product:NuGet.exe NuGet.exe Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. and removed Triage:Untriaged labels Nov 23, 2021
dominoFire pushed a commit to NuGet/NuGet.Client that referenced this issue Nov 24, 2021
… logs `nuget.exe` Long Path support errors only on Windows (#4346)

Fixes NuGet/Home#11407 ; fixes unused param in RegistryKeyUtility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. Product:NuGet.exe NuGet.exe Type:Bug
Projects
None yet
2 participants