fix(software-apps): fix installed runtime and redistributable detection - #724
Open
hamsa0x7 wants to merge 1 commit into
Open
fix(software-apps): fix installed runtime and redistributable detection#724hamsa0x7 wants to merge 1 commit into
hamsa0x7 wants to merge 1 commit into
Conversation
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
Enhances the registry display name pattern matching to support multiple pipe-separated (
|) patterns, and updates definitions for .NET Runtime 3.1 and Visual C++ 2015-2022 to prevent them from being incorrectly reported as missing.Problem
Under
AppStatusDiscoveryService.cs, when checking if an app is installed, the service verifies the installation status against a single registry pattern to prevent false positives.However, two specific runtimes had incorrect/outdated patterns:
Microsoft .NET Core Runtime - 3.1...(containing the wordCore), whereas the definition expectedMicrosoft .NET Runtime - 3.1....Microsoft Visual C++ v14 Redistributable...instead ofMicrosoft Visual C++ 2015-2022 Redistributable....These mismatches caused Winhance to mistakenly reject the WinGet check as a false positive, marking the runtimes as missing even when they were successfully installed.
Changes
src/Winhance.Infrastructure/Features/SoftwareApps/Services/AppStatusDiscoveryService.cs: UpdatedMatchesPatternto split patterns by|to allow OR matching against multiple patterns.src/Winhance.Core/Features/SoftwareApps/Models/ExternalAppDefinitions.RuntimesAndDependencies.cs: Added the alternative registry display names for .NET Runtime 3.1 and Visual C++ 2015-2022.tests/Winhance.Infrastructure.Tests/Services/AppStatusDiscoveryServiceTests.cs: Added unit tests to cover pipe-separated pattern matching, .NET Core Runtime names, and Visual C++ v14 names.Related Issues
Fixes #705