mirror of
https://github.com/moparisthebest/pacman
synced 2024-08-13 17:03:46 -04:00
makepkg.sh.in: fix a GNU-ism in su invocation
GNU su supports the -c option to specify a command to execute. However, other flavours of su may have a different interpretation of the '-c' flag (e.g. FreeBSD and OpenBSD). The behaviour is correct when '-c' follows an explicit username. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
8e8391e17c
commit
a93e058b68
@ -394,7 +394,7 @@ run_pacman() {
|
|||||||
if [ "$(type -p sudo)" ]; then
|
if [ "$(type -p sudo)" ]; then
|
||||||
cmd="sudo $cmd"
|
cmd="sudo $cmd"
|
||||||
else
|
else
|
||||||
cmd="su -c '$cmd'"
|
cmd="su root -c '$cmd'"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
eval "$cmd"
|
eval "$cmd"
|
||||||
|
Loading…
Reference in New Issue
Block a user