Compare commits

...

2 Commits

Author SHA1 Message Date
Tobias Powalowski
e440f0e01a Merge branch 'run0' into 'master'
replace sudo with run0

See merge request archlinux/devtools!266
2025-08-13 02:44:56 +02:00
Tobias Powalowski
0712c4fe2e replace sudo with run0 2024-06-09 12:39:13 +02:00

View File

@@ -15,8 +15,8 @@ check_root() {
local orig_argv=("$@") local orig_argv=("$@")
(( EUID == 0 )) && return (( EUID == 0 )) && return
if type -P sudo >/dev/null; then if type -P run0 && type -P pkexec >/dev/null; then
exec sudo --preserve-env="${keepenv}" -- "${orig_argv[@]}" exec run0 -- "${orig_argv[@]}"
else else
exec su root -c "$(printf ' %q' "${orig_argv[@]}")" exec su root -c "$(printf ' %q' "${orig_argv[@]}")"
fi fi