summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-04-12 12:35:06 +0100
committerdavidovski <david@davidovski.xyz>2022-04-12 12:35:06 +0100
commit02d1cfbbda20eb8ab9bbb256bf29e536bff4b746 (patch)
tree68e70de5df6cff4d5f8eca96036e65ca64e96977 /src
parent6a757a93556770f227be9bdd85ce68c44d047777 (diff)
fixed not using EUID for posixv1.2.1
Diffstat (limited to 'src')
-rwxr-xr-xsrc/xi.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xi.sh b/src/xi.sh
index ae53795..1c38f99 100755
--- a/src/xi.sh
+++ b/src/xi.sh
@@ -130,7 +130,7 @@ if [ "$#" = "0" ]; then
show_xipkg_stats
else
# showing stats doesn't require root, so we can only check when we are here
- [ ! "$EUID" == 0 ] && {
+ [ "$(id -u)" == "0" ] || {
printf "${RED}Please run as root!\n"
exit 1
}