Skip to content

Commit

Permalink
Priorize sudo/doas over safer run0
Browse files Browse the repository at this point in the history
  • Loading branch information
rusty-snake committed Dec 22, 2024
1 parent fcd473d commit 5fd9074
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/markdown/Installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ running `sudo meson install` will drop permissions and rebuild out of date
targets as the original user, not as root.

*(since 1.1.0)* Re-invoking as root will try to guess the user's preferred method for
re-running commands as root. The order of precedence is: run0, sudo, doas, pkexec
re-running commands as root. The order of precedence is: sudo, doas, run0, pkexec
(polkit). An elevation tool can be forced by setting `$MESON_ROOT_CMD`.

## DESTDIR support
Expand Down
2 changes: 1 addition & 1 deletion mesonbuild/minstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,9 +566,9 @@ def do_install(self, datafilename: str) -> None:
raise
rootcmd = (
os.environ.get('MESON_ROOT_CMD')
or shutil.which('run0')
or shutil.which('sudo')
or shutil.which('doas')
or shutil.which('run0')
)
pkexec = shutil.which('pkexec')
if rootcmd is None and pkexec is not None and 'PKEXEC_UID' not in os.environ:
Expand Down

0 comments on commit 5fd9074

Please sign in to comment.