🔧 Check for httpie in netlify DNS script

This commit is contained in:
Jérôme Petazzoni
2023-03-08 17:57:17 +01:00
parent d8f8bf6d87
commit cba2ff5ff7

View File

@@ -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")