@@ -37,13 +37,12 @@ set -o pipefail # Return exit status of the last command in the pipe that failed
37
37
# GLOBALS
38
38
# ==============================================================================
39
39
readonly EX_OK=0 # Successful termination
40
- readonly EX_ROOT=3 # Running as root
41
- readonly EX_PHP_NOT_FOUND=4 # PHP was not found
42
- readonly EX_GIT_NOT_FOUND=5 # GIT not found
43
- readonly EX_CURL_NOT_FOUND=6 # curl not found
44
- readonly EX_NET_ERR=7 # Something went wrong during a file download
45
- readonly EX_SIG_MISMATCH=8 # Composer installer signature mismatch
46
- readonly EX_SETUP_ERR=9 # Composer setup failure
40
+ readonly EX_PHP_NOT_FOUND=3 # PHP was not found
41
+ readonly EX_GIT_NOT_FOUND=4 # GIT not found
42
+ readonly EX_CURL_NOT_FOUND=5 # curl not found
43
+ readonly EX_NET_ERR=6 # Something went wrong during a file download
44
+ readonly EX_SIG_MISMATCH=7 # Composer installer signature mismatch
45
+ readonly EX_SETUP_ERR=8 # Composer setup failure
47
46
48
47
# Temporary directory for storing the Composer setup script
49
48
readonly COMPOSER_TMPDIR=$( mktemp -d " /tmp/composer.XXXXXXXXXXXX" )
@@ -119,17 +118,13 @@ display_error_message() {
119
118
# EX_CURL_NOT_FOUND
120
119
# EX_GIT_NOT_FOUND
121
120
# EX_PHP_NOT_FOUND
122
- # EX_ROOT
123
121
# UID
124
122
# Arguments:
125
123
# None
126
124
# Returns:
127
125
# None
128
126
# ------------------------------------------------------------------------------
129
127
check_runtime_requirements () {
130
- if [[ " $UID " -eq 0 ]]; then
131
- display_error_message ' This script must NOT be run as root' $EX_ROOT
132
- fi
133
128
type php > /dev/null 2>&1 || display_error_message \
134
129
' PHP is not found, installation aborted!' $EX_PHP_NOT_FOUND
135
130
type git > /dev/null 2>&1 || display_error_message \
0 commit comments