From 6574aa6619188e3394add965ee4d4ec1ed3abf1f Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Fri, 27 Sep 2024 09:57:51 -0700 Subject: [PATCH] contracts-bedrock: better error message (#12148) The build fails when jq is not installed with a mysterious error message, so improve the error message. This will help debugging for new contributors. --- .../scripts/checks/check-foundry-install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/contracts-bedrock/scripts/checks/check-foundry-install.sh b/packages/contracts-bedrock/scripts/checks/check-foundry-install.sh index ccd337e958e7..a0fa104d5bc8 100755 --- a/packages/contracts-bedrock/scripts/checks/check-foundry-install.sh +++ b/packages/contracts-bedrock/scripts/checks/check-foundry-install.sh @@ -5,6 +5,13 @@ CONTRACTS_BASE=$(dirname "$(dirname "$SCRIPT_DIR")") MONOREPO_BASE=$(dirname "$(dirname "$CONTRACTS_BASE")") VERSIONS_FILE="${MONOREPO_BASE}/versions.json" +if ! command -v jq &> /dev/null +then + # shellcheck disable=SC2006 + echo "Please install jq" >&2 + exit 1 +fi + if ! command -v forge &> /dev/null then # shellcheck disable=SC2006