mirror of
https://github.com/mtan93/Installomator.git
synced 2026-04-05 06:13:15 +01:00
DEBUG mode will overrule running as root
Either DEBUG mode set, and the script will run, no matter it's not running as root.
This commit is contained in:
@@ -58,7 +58,7 @@ versionKey="CFBundleShortVersionString"
|
|||||||
currentUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ { print $3 }')
|
currentUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ { print $3 }')
|
||||||
|
|
||||||
# MARK: check for root
|
# MARK: check for root
|
||||||
if [[ "$(whoami)" != "root" && "$DEBUG" -ne 2 ]]; then
|
if [[ "$(whoami)" != "root" && "$DEBUG" -eq 0 ]]; then
|
||||||
# not running as root
|
# not running as root
|
||||||
cleanupAndExit 6 "not running as root, exiting"
|
cleanupAndExit 6 "not running as root, exiting"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user