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
No known key found for this signature in database
GPG key ID: E45B10DD027D2472

View file

@ -19,6 +19,15 @@ source "$(dirname "${BASH_SOURCE[0]}")/libexec/prelude.bash"
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
################