scripts: Use curl -f (--fail).

This makes curl exit with nonzero status on HTTP 4xx/5xx errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-07-13 12:00:50 -07:00
committed by Tim Abbott
parent e373df88e0
commit 47897c76a2
20 changed files with 22 additions and 22 deletions

View File

@@ -19,7 +19,7 @@ if ! check_version; then
tmpdir="$(mktemp -d)"
trap 'rm -r "$tmpdir"' EXIT
cd "$tmpdir"
curl -LO "https://github.com/koalaman/shellcheck/releases/download/v$version/$tarball"
curl -fLO "https://github.com/koalaman/shellcheck/releases/download/v$version/$tarball"
sha256sum -c <<<"${sha256[$arch]} $tarball"
tar -xJf "$tarball" --no-same-owner --strip-components=1 -C /usr/local/bin "shellcheck-v$version/shellcheck"
check_version