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

@@ -8,7 +8,7 @@
#BRANCH=
#SSH_SECRET_ID=
if ! curl -s -m 5 http://169.254.169.254/latest/dynamic/instance-identity/document | grep instanceId; then
if ! curl -fLs -m 5 http://169.254.169.254/latest/dynamic/instance-identity/document | grep instanceId; then
echo "This should be run on AWS instances, not locally."
exit 1
fi