From cbb1e08e2664e1b8fb3a68ee34e3e47aeb3a425f Mon Sep 17 00:00:00 2001 From: Sam Ess Date: Sat, 16 Oct 2021 16:42:56 -0400 Subject: [PATCH] Move root user check forward Root user check is now moved from the installation function to main. The new location is after parsing the label but before printing the log for blocking process and notify settings. This prevents a downloading an application that can't be installed. Resolves issue #88 --- fragments/main.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fragments/main.sh b/fragments/main.sh index dfba2c9..08406ca 100644 --- a/fragments/main.sh +++ b/fragments/main.sh @@ -5,6 +5,10 @@ ;; esac +# MARK: check for root + if [ "$(whoami)" != "root" ]; then + # not running as root + cleanupAndExit 6 "not running as root, exiting" # MARK: application download and installation starts here