Skip to content

Commit

Permalink
use normal error behaviour for failing http requests (fixes #782)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas2511 committed Dec 10, 2020
1 parent abd369d commit e784ba3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dehydrated
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,9 @@ _sed() {

# Print error message and exit with error
_exiterr() {
echo "ERROR: ${1}" >&2
if [ -n "${1:-}" ]; then
echo "ERROR: ${1}" >&2
fi
[[ "${skip_exit_hook:-no}" = "no" ]] && [[ -n "${HOOK:-}" ]] && ("${HOOK}" "exit_hook" "${1}" || echo 'exit_hook returned with non-zero exit code!' >&2)
exit 1
}
Expand Down Expand Up @@ -844,7 +846,7 @@ http_request() {

# remove temporary domains.txt file if used
[[ "${COMMAND:-}" = "sign_domains" && -n "${PARAM_DOMAIN:-}" && -n "${DOMAINS_TXT:-}" ]] && rm "${DOMAINS_TXT}"
exit 1
_exiterr
fi
fi

Expand Down

0 comments on commit e784ba3

Please sign in to comment.