Meta: Add error message when running serenity.sh as root

It's not a good idea, and it causes countless issues for people who
do so and then try to run without root later.
This commit is contained in:
Andrew Kaster 2022-05-30 23:35:59 -06:00 committed by Linus Groh
commit e46a00f0c0
Notes: sideshowbarker 2024-07-18 04:46:35 +09:00

View file

@ -82,6 +82,10 @@ if [ "$CMD" = "help" ]; then
exit 0
fi
if [ "$(id -u)" -eq 0 ]; then
die "Do not run serenity.sh as root, your Build directory will become root-owned"
fi
if [ -n "$1" ]; then
TARGET="$1"; shift
else