From 797e34f9654d87195f790cc03b53e0365cdcad55 Mon Sep 17 00:00:00 2001 From: John Smith Date: Mon, 11 Sep 2023 10:12:26 -0400 Subject: [PATCH] ensure setup_linux.sh isn't run as root --- dev-setup/setup_linux.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dev-setup/setup_linux.sh b/dev-setup/setup_linux.sh index 2b60452f..d5b21ace 100755 --- a/dev-setup/setup_linux.sh +++ b/dev-setup/setup_linux.sh @@ -1,6 +1,11 @@ #!/bin/bash set -eo pipefail +if [ $(id -u) -eq 0 ]; then + echo "Don't run this as root" + exit +fi + SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" if [[ "$(uname)" != "Linux" ]]; then