173173 }'
174174 )
175175 elif [[ " ${silent} " == " true" ]]; then
176- echo " Using silent output"
176+ echo " INFO: using silent output"
177177 curl --silent --fail --show-error --location " ${CURL_OPTIONS[@]} " \
178178 --request " POST" --url " ${webhook_url} " \
179179 --data-raw " ${compact_body} "
@@ -182,13 +182,13 @@ EOF
182182 url_path=$(
183183 sed -Ee ' s,https?://[^/]*(/[^?&#]*).*,\1,' <<< " ${webhook_url}"
184184 )
185- curl --verbose --fail --show-error --location " ${CURL_OPTIONS[@]} " \
185+ curl --verbose --silent -- fail --show-error --location " ${CURL_OPTIONS[@]} " \
186186 --request " POST" --url " ${webhook_url} " \
187187 --data-raw " ${compact_body} " 2>&1 \
188188 | sed -e " s#${url_path} #***WEBHOOK URL REDACTED***#g"
189189 curl_errors=$(( ${curl_errors} + ${PIPESTATUS[0]} ))
190190 else
191- curl --verbose --fail --show-error --location " ${CURL_OPTIONS[@]} " \
191+ curl --verbose --silent -- fail --show-error --location " ${CURL_OPTIONS[@]} " \
192192 --request " POST" --url " ${webhook_url} " \
193193 --data-raw " ${compact_body} " \
194194 | sed -e " s#${url_path} #***WEBHOOK URL REDACTED***#g"
@@ -237,6 +237,6 @@ jq --slurp 'add' \
237237 >&3
238238
239239if [[ " ${curl_errors} " -ne 0 ]]; then
240- echo " Sending your message to the slack webhook failed, exiting exceptionally. "
240+ echo " ERROR: sending the message to the Slack webhook has failed "
241241 exit 1
242242fi
0 commit comments