From 0af10068ce69768a2923f90140c61edb1ba65813 Mon Sep 17 00:00:00 2001 From: Gene Hoffman <30377676+hoffmang9@users.noreply.github.com> Date: Tue, 18 May 2021 11:40:26 -0700 Subject: [PATCH] Clearly prohibit root from installing the GUI (#5232) * GUI should not build or run as root * Use id -u instead * shellcheck --- install-gui.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/install-gui.sh b/install-gui.sh index d8422a86e7d8..fd848b0b5b25 100755 --- a/install-gui.sh +++ b/install-gui.sh @@ -7,6 +7,11 @@ if [ -z "$VIRTUAL_ENV" ]; then exit 1 fi +if [ "$(id -u)" = 0 ]; then + echo "The Chia Blockchain GUI can not be installed or run by the root user." + exit 1 +fi + # Allows overriding the branch or commit to build in chia-blockchain-gui SUBMODULE_BRANCH=$1