Commit 96d7eabe authored by Lukas Schauer's avatar Lukas Schauer

use "-s" to detect content in temporary curl error logfile

parent c4be4c69
......@@ -55,7 +55,7 @@ _request() {
curl -sSf "${2}" -d "${3}" 2> "${temperr}"
fi
if [[ ! -z "$(<${temperr})" ]]; then
if [[ -s "${temperr}" ]]; then
echo " + ERROR: An error occured while sending ${1}-request to ${2} ($(<"${temperr}"))" >&2
rm -f "${temperr}"
exit 1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment