fix: use trap to run bye on errexit (#581)
This commit is contained in:
parent
20d85d8949
commit
8b8dcc050a
|
|
@ -308,6 +308,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"
|
||||
read -rp 'Email: ' email
|
||||
curl -s -O --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \
|
||||
|
|
@ -335,6 +336,9 @@ echo -e "\U1F575 Detecting your OS"
|
|||
check_os
|
||||
APPSMITH_INSTALLATION_ID=$(curl -s 'https://api6.ipify.org')
|
||||
|
||||
# Run bye if failure happens
|
||||
trap bye EXIT
|
||||
|
||||
curl -s -O --location --request POST 'https://hook.integromat.com/dkwb6i52am93pi30ojeboktvj32iw0fa' \
|
||||
--header 'Content-Type: text/plain' \
|
||||
--data-raw '{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user