Clearly prohibit root from installing the GUI (#5232)

* GUI should not build or run as root

* Use id -u instead

* shellcheck
This commit is contained in:
Gene Hoffman 2021-05-18 11:40:26 -07:00 committed by GitHub
parent 880df53f72
commit 0af10068ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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