Make "Open install location" resolve across package managers#4958
Merged
Gabriel Dufresne (GabrielDuf) merged 2 commits intoJun 18, 2026
Conversation
Copilot started reviewing on behalf of
Gabriel Dufresne (GabrielDuf)
June 18, 2026 13:04
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the “Open install location” feature across multiple package managers by making install-folder detection more resilient (env-var aware roots, multiple possible install locations) and adding Windows-specific fallbacks for ARP/MSIX-based installs (including cached registry lookups for WinGet Store/MSIX scenarios).
Changes:
- Added a Windows ARP (Add/Remove Programs) registry-based fallback for install location resolution, including a WinGet LocalPC encoded-ID fast path.
- Added MSIX/Store install location resolution for WinGet using registry-backed indexing and caching, with a last-resort fuzzy name match.
- Improved per-manager install location heuristics (Scoop, Chocolatey, Cargo, Flatpak, Homebrew, Vcpkg, Npm) via env vars, multiple roots, and clearer fallbacks.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/UniGetUI.PackageEngine.PackageManagerClasses/Manager/Helpers/BasePkgDetailsHelper.cs | Adds a manager-agnostic ARP registry fallback when a manager-specific install path is missing/invalid. |
| src/UniGetUI.PackageEngine.PackageManagerClasses/Manager/Helpers/ArpRegistryHelper.cs | Introduces ARP registry indexing + TTL caching and encoded-ID resolution to locate install folders on Windows. |
| src/UniGetUI.PackageEngine.Managers.WinGet/Helpers/WinGetPkgDetailsHelper.cs | Uses ARP encoded-ID lookup, MSIX ID lookup, and ARP-by-name before existing path probing; falls back to MSIX enumeration. |
| src/UniGetUI.PackageEngine.Managers.WinGet/ClientHelpers/WinGetIconsHelper.cs | Adds cached registry-backed MSIX location resolution (by encoded ID and fuzzy name matching). |
| src/UniGetUI.PackageEngine.Managers.Vcpkg/Helpers/VcpkgPkgDetailsHelper.cs | Simplifies install-location fallback logic; returns null when no valid path exists. |
| src/UniGetUI.PackageEngine.Managers.Scoop/Helpers/ScoopPkgDetailsHelper.cs | Honors SCOOP/SCOOP_GLOBAL and checks both user and global install roots, returning the first existing path. |
| src/UniGetUI.PackageEngine.Managers.Npm/Helpers/NpmPkgDetailsHelper.cs | Clarifies/corrects global module path construction under %AppData%\npm\node_modules. |
| src/UniGetUI.PackageEngine.Managers.Homebrew/Helpers/HomebrewPkgDetailsHelper.cs | Adds Linuxbrew prefix and checks both Cellar and Caskroom for install locations. |
| src/UniGetUI.PackageEngine.Managers.Flatpak/Helpers/FlatpakPkgDetailsHelper.cs | Checks both system-wide and per-user Flatpak install locations and returns the first existing path. |
| src/UniGetUI.PackageEngine.Managers.Chocolatey/Helpers/ChocolateyDetailsHelper.cs | Resolves Chocolatey root via ChocolateyInstall env var with fallback to executable directory (handling bin shim). |
| src/UniGetUI.PackageEngine.Managers.Cargo/Helpers/CargoPkgDetailsHelper.cs | Uses CARGO_HOME (defaulting to ~/.cargo) to locate the install bin directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Marc-André Moreau (mamoreau-devolutions)
approved these changes
Jun 18, 2026
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.
This pull request improves the accuracy and robustness of package install location detection across several package managers by enhancing environment variable support, adding fallback mechanisms, and handling multiple installation scenarios. It also introduces advanced logic for resolving MSIX/Store package locations for WinGet, including registry-based lookups and caching for performance.
Enhancements to Install Location Detection:
CARGO_HOMEenvironment variable for the install root, falling back to the user profile if unset.ChocolateyInstallenvironment variable, with a fallback to the executable's directory, and properly steps out of thebinfolder if needed.CellarandCaskroomdirectories for formulae and casks.SCOOPandSCOOP_GLOBALroots, checking both user and global install locations, and returns the first valid path found.nullif no valid install location is found.%AppData%\npm\node_modules.Advanced MSIX/Store Package Resolution for WinGet:
WinGetIconsHelperto resolve MSIX/Store package locations by full ID or by fuzzy name matching, using the Windows registry for fast lookups and caching results for performance.General Improvements:
usingdirectives for threading and string manipulation.