Making errors more explicit in install.sh (#1384)

Co-authored-by: Arpit Mohan <mohanarpit@users.noreply.github.com>
This commit is contained in:
James 2020-10-26 08:02:45 +01:00 committed by GitHub
parent 57031fed10
commit dd42089440
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -314,7 +314,7 @@ echo_contact_support() {
bye() { # Prints a friendly good bye message and exits the script.
set +o errexit
echo "Please share your email to receive support with the installation"
echo "Please review the above errors, and share your email if you wish to receive support with the installation"
read -rp 'Email: ' email
curl -s --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \
@ -327,7 +327,8 @@ bye() { # Prints a friendly good bye message and exits the script.
"email": "'"$email"'"
}
}' > /dev/null
echo -e "\nExiting for now. Bye! 👋 \n"
echo ""
echo -e "\nThere was an error with your installation, Exiting for now. Bye! 👋 \n"
exit 1
}
@ -367,7 +368,9 @@ else
fi
if [[ $EUID -eq 0 ]]; then
echo "+++++++++++ ERROR ++++++++++++++++++++++"
echo "Please do not run this script as root/sudo."
echo "++++++++++++++++++++++++++++++++++++++++"
echo_contact_support
bye
fi