Browse Source

Merge pull request #6764 from patschi/tools-install-clear-msg

Clearer message to install required tool, e.g. jq
FreddleSpl0it 1 week ago
parent
commit
9133b9899c
1 changed files with 8 additions and 2 deletions
  1. 8 2
      _modules/scripts/core.sh

+ 8 - 2
_modules/scripts/core.sh

@@ -17,7 +17,13 @@ caller="${BASH_SOURCE[1]##*/}"
 
 
 get_installed_tools(){
 get_installed_tools(){
     for bin in openssl curl docker git awk sha1sum grep cut jq; do
     for bin in openssl curl docker git awk sha1sum grep cut jq; do
-        if [[ -z $(command -v ${bin}) ]]; then echo "Cannot find ${bin}, exiting..."; exit 1; fi
+        if [[ -z $(command -v ${bin}) ]]; then
+          echo "Error: Cannot find command '${bin}'. Cannot proceed."
+          echo "Solution: Please review system requirements and install requirements. Then, re-run the script."
+          echo "See System Requirements: https://docs.mailcow.email/getstarted/install/"
+          echo "Exiting..."
+          exit 1
+        fi
     done
     done
 
 
     if grep --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo -e "${LIGHT_RED}BusyBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\"${NC}"; exit 1; fi
     if grep --help 2>&1 | head -n 1 | grep -q -i "busybox"; then echo -e "${LIGHT_RED}BusyBox grep detected, please install gnu grep, \"apk add --no-cache --upgrade grep\"${NC}"; exit 1; fi
@@ -221,4 +227,4 @@ detect_major_update() {
       fi
       fi
     fi
     fi
   fi
   fi
-}
+}