summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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
}