From cba2ff5ff75a0948ebf76235959b71d8427456c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Petazzoni?= Date: Wed, 8 Mar 2023 17:57:17 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Check=20for=20httpie=20in=20netl?= =?UTF-8?q?ify=20DNS=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prepare-vms/netlify-dns.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/prepare-vms/netlify-dns.sh b/prepare-vms/netlify-dns.sh index 35e7b5ed..d2fe0e56 100755 --- a/prepare-vms/netlify-dns.sh +++ b/prepare-vms/netlify-dns.sh @@ -26,6 +26,12 @@ if ! [ -f "$NETLIFY_CONFIG_FILE" ]; then exit 1 fi +if ! command -v http >/dev/null; then + echo "Could not find the 'http' command line tool." + echo "Please install it (the package name might be 'httpie')." + exit 1 +fi + NETLIFY_USERID=$(jq .userId < "$NETLIFY_CONFIG_FILE") NETLIFY_TOKEN=$(jq -r .users[$NETLIFY_USERID].auth.token < "$NETLIFY_CONFIG_FILE")