{{ message }}
Repository navigation
Flatten Windows publish layout and fix restart handoff - #4719
Merged
Merged
Conversation
Marc-André Moreau (mamoreau-devolutions)
requested a review
from a team
as a code owner
May 7, 2026 20:15
Gabriel Dufresne (GabrielDuf)
approved these changes
May 7, 2026
This was referenced May 8, 2026
Closed
Gabriel Dufresne (GabrielDuf)
added a commit
that referenced
this pull request
Oct 19, 2026
On Windows, CoreTools.Which searched Environment.CurrentDirectory before any PATH entry, and blank, quoted-empty or relative PATH entries also resolved against the current directory. Starting UniGetUI from a folder holding a planted gsudo.exe, winget.exe, choco.exe or python.exe made that file win over the real one. This was the root of the gsudo concern on the elevator fallback, and it still applied to the ForceUserGSudo opt-in and to every manager executable lookup. The search now covers only fully qualified PATH entries. The Windows elevator decision moves into ResolveWindowsElevatorPathAsync, which takes the executable directory and the two gsudo switches as inputs. The release no-fallback guarantee is no longer hidden behind #if !DEBUG and is now covered by tests. The DEBUG branch also stops logging "Using system GSudo" when gsudo is not installed. The parent-directory lookup in ResolveBundledElevatorPath is kept: #4719 added it for the nested publish layout. Its parent is admin-only on a Program Files install, and on a user-writable install whoever can plant there can already replace UniGetUI.exe. The Linux sudo/pkexec/SSH_ASKPASS resolution is unchanged for the same reason: PATH and environment are the user's own, and a fixed /usr/bin path would break NixOS's /run/wrappers/bin/sudo.
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
UniGetUI.exe,UniGetUI.Avalonia.exe, andpinget.exeship side by sideUniGetUI Elevator.execorrectly in the flat side-by-side layout, with fallback for the older subfolder layoutValidation
dotnet build UniGetUI.Avalonia/UniGetUI.Avalonia.csproj -c Debug -p:Platform=x64 -r win-x64