From: tobtoht Date: Wed, 9 Apr 2025 04:17:41 +0000 (+0200) Subject: guix: warn if running guix-build as root X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=dc4d7c9dbfc7560819d325d37979bce3e9f53798;p=gamesguru%2Ffeather.git guix: warn if running guix-build as root --- diff --git a/contrib/guix/guix-build b/contrib/guix/guix-build index 31f95471..d7a78bbb 100755 --- a/contrib/guix/guix-build +++ b/contrib/guix/guix-build @@ -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 ################