summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--abuild.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index 1f330b1..937c8e8 100644
--- a/abuild.in
+++ b/abuild.in
@@ -2148,7 +2148,7 @@ done
shift $(( $OPTIND - 1 ))
# check so we are not root
-if [ "$(whoami)" = "root" ] && [ -z "$FAKEROOTKEY" ]; then
+if [ $(id -u) -eq 0 ] && [ -z "$FAKEROOTKEY" ]; then
[ -z "$forceroot" ] && die "Do not run abuild as root"
FAKEROOT=
fi