From b885fdb742dbec4925ef97bc84447ce8117621a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Theilgaard?= Date: Wed, 1 Dec 2021 22:31:48 +0100 Subject: [PATCH] DEBUG mode will overrule running as root Either DEBUG mode set, and the script will run, no matter it's not running as root. --- fragments/arguments.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fragments/arguments.sh b/fragments/arguments.sh index 0f8765f..d682862 100644 --- a/fragments/arguments.sh +++ b/fragments/arguments.sh @@ -58,7 +58,7 @@ versionKey="CFBundleShortVersionString" currentUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ { print $3 }') # MARK: check for root -if [[ "$(whoami)" != "root" && "$DEBUG" -ne 2 ]]; then +if [[ "$(whoami)" != "root" && "$DEBUG" -eq 0 ]]; then # not running as root cleanupAndExit 6 "not running as root, exiting" fi