disabling run as user option for OSX

This commit is contained in:
jash
2018-12-08 20:33:37 +01:00
committed by kexkey
parent 7e6638c940
commit 91b3f5323d

16
dist/setup.sh vendored
View File

@@ -528,16 +528,16 @@ sanity_checks() {
echo " check requirements."
local OS=$(uname -s)
if [[ $OS == 'Darwin' ]]; then
echo " Run as user option is not supported on OSX."
echo " Please run start.sh later as the user you are running this setup utility under."
RUN_AS_USER=$USER
fi
if [[ ''$RUN_AS_USER == '' ]]; then
RUN_AS_USER=$USER
else
local OS=$(uname -s)
id -u $RUN_AS_USER > /dev/null 2>&1
if [[ $OS == 'Darwin' && $? == 1 ]]; then
echo " Automatic user creation not supported on OSX."
echo " Please create the user \"$RUN_AS_USER\" by hand and run: ./setup.sh -i"
exit
fi
fi
local sudo=0