Skip to content

Commit ccb84b1

Browse files
committed
Review logged messages + Stop cluttering curl verbose output with unnecessary progress information
1 parent 7780eb4 commit ccb84b1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ EOF
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

239239
if [[ "${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
242242
fi

0 commit comments

Comments
 (0)