mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-03-18 23:33:48 +01:00
quote output filename
Shouldn't be necessary for output from `mktemp`, but better play it safe.
This commit is contained in:
@@ -43,11 +43,11 @@ hex2bin() {
|
||||
_request() {
|
||||
temperr="$(mktemp)"
|
||||
if [ "${1}" = "head" ]; then
|
||||
curl -sSf -I "${2}" 2>${temperr}
|
||||
curl -sSf -I "${2}" 2>"${temperr}"
|
||||
elif [ "${1}" = "get" ]; then
|
||||
curl -sSf "${2}" 2>${temperr}
|
||||
curl -sSf "${2}" 2>"${temperr}"
|
||||
elif [ "${1}" = "post" ]; then
|
||||
curl -sSf "${2}" -d "${3}" 2>${temperr}
|
||||
curl -sSf "${2}" -d "${3}" 2>"${temperr}"
|
||||
fi
|
||||
if [ ! -z "$(<${temperr})" ]; then echo " + ERROR: An error occured while sending ${1}-request to ${2} ($(<"${temperr}"))" >&2; exit 1; fi
|
||||
rm -f "${temperr}"
|
||||
|
||||
Reference in New Issue
Block a user