From b0c45169f257c0f5114d75fc608ee728431a3702 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 4 Jul 2024 18:23:14 +0000 Subject: [PATCH] make.sh: Refactor the root user check Signed-off-by: Michael Tremer --- make.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/make.sh b/make.sh index 41476ce3b5..7f3333a214 100755 --- a/make.sh +++ b/make.sh @@ -381,8 +381,8 @@ prepareenv() { trap "exiterror 'Build process interrupted'" SIGINT SIGTERM SIGQUIT # Checking if running as root user - if [ $(id -u) -ne 0 ]; then - exiterror "root privileges required for building" + if [ "${UID}" -ne 0 ]; then + exiterror "root privileges required for building" fi local free_space free_blocks block_size -- 2.47.3