From 4b14a7b77a028165c6a13b65a9b58d209650b0a5 Mon Sep 17 00:00:00 2001 From: Darren Reid Date: Wed, 20 Nov 2024 12:06:12 +1100 Subject: [PATCH] Update installer to check for jq --- install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 94e37ee..bf65b9a 100644 --- a/install.sh +++ b/install.sh @@ -37,7 +37,18 @@ check_prerequisites() { exit 1 fi - log "Prerequisites check passed. Docker and Docker Compose are installed." + # Check if jq is installed, install if not present + if ! command -v jq &> /dev/null; then + log "jq is not installed. Installing jq..." + sudo apt-get update && sudo apt-get install -y jq + if ! command -v jq &> /dev/null; then + echo "Failed to install jq. Please install it manually." + exit 1 + fi + log "jq has been successfully installed." + fi + + log "Prerequisites check passed. Docker, Docker Compose, and jq are installed." } install_gum() {