mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2024-01-19 02:48:50 +00:00
setup.sh: Remove __err function (#2876)
This commit is contained in:
parent
1e65f95a3b
commit
e32a530c15
17
setup.sh
17
setup.sh
|
@ -19,7 +19,6 @@ USE_SELINUX=
|
|||
USE_TTY=
|
||||
VOLUME=
|
||||
|
||||
RED=$(echo -ne '\e[31m\e[1m')
|
||||
WHITE=$(echo -ne '\e[37m')
|
||||
ORANGE=$(echo -ne '\e[38;5;214m')
|
||||
LBLUE=$(echo -ne '\e[94m')
|
||||
|
@ -27,22 +26,6 @@ RESET=$(echo -ne '\e[0m')
|
|||
|
||||
set -euEo pipefail
|
||||
shopt -s inherit_errexit 2>/dev/null || true
|
||||
trap '__err "${BASH_SOURCE}" "${FUNCNAME[0]:-?}" "${BASH_COMMAND:-?}" "${LINENO:-?}" "${?:-?}"' ERR
|
||||
|
||||
function __err
|
||||
{
|
||||
[[ ${5} -gt 1 ]] && exit 1
|
||||
|
||||
local ERR_MSG="\n--- ${RED}UNCHECKED ERROR${RESET}"
|
||||
ERR_MSG+="\n - script = ${1}"
|
||||
ERR_MSG+="\n - function = ${2}"
|
||||
ERR_MSG+="\n - command = ${3}"
|
||||
ERR_MSG+="\n - line = ${4}"
|
||||
ERR_MSG+="\n - exit code = ${5}"
|
||||
ERR_MSG+='\n\nThis should not have happened. Please file a bug report.\n'
|
||||
|
||||
echo -e "${ERR_MSG}"
|
||||
}
|
||||
|
||||
function _show_local_usage
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue