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

Add run0 support #28396

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Telegram/SourceFiles/platform/linux/launcher_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
const auto launching = justRelaunch
? (cExeDir() + cExeName())
: cWriteProtected()
? u"pkexec"_q
? GLib::find_program_in_path("run0")
? u"run0"_q
: u"pkexec"_q
: (cExeDir() + u"Updater"_q);
argumentsList.push_back(launching.toStdString());

Expand All @@ -61,7 +63,7 @@ bool Launcher::launchUpdater(UpdaterLaunch action) {
: launching;
argumentsList.push_back(argv0.toStdString());
} else if (cWriteProtected()) {
// Elevated process that pkexec should launch.
// Elevated process that run0/pkexec should launch.
const auto elevated = cWorkingDir() + u"tupdates/temp/Updater"_q;
argumentsList.push_back(elevated.toStdString());
}
Expand Down