guix: warn if running guix-build as root

This commit is contained in:
tobtoht
2025-04-09 06:17:41 +02:00
parent b2edef87a3
commit dc4d7c9dbf
+9
View File
@@ -19,6 +19,15 @@ source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
check_tools cat mkdir make getent curl git guix check_tools cat mkdir make getent curl git guix
################
# Check if we're running as root
################
if [ "$EUID" -eq 0 ]; then
echo "Warning! Running this script as root may cause problems."
echo
fi
################ ################
# GUIX_BUILD_OPTIONS should be empty # GUIX_BUILD_OPTIONS should be empty
################ ################