From c1bfb8cb0e112463ab6b6ec56f48685a57995c8c Mon Sep 17 00:00:00 2001 From: Brendan Coles Date: Sun, 1 Nov 2020 01:11:22 +0000 Subject: [PATCH] Meta: lint-shell-scripts: Exit if shellcheck is not installed --- Meta/lint-shell-scripts.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Meta/lint-shell-scripts.sh b/Meta/lint-shell-scripts.sh index 773a05b03b..322e6dafcf 100755 --- a/Meta/lint-shell-scripts.sh +++ b/Meta/lint-shell-scripts.sh @@ -4,6 +4,11 @@ set -e pipefail script_path=$(cd -P -- "$(dirname -- "$0")" && pwd -P) cd "$script_path/.." +if ! command -v shellcheck &>/dev/null ; then + echo "shellcheck is not available. Either skip this script, or install shellcheck." + exit 1 +fi + ERRORS=() while IFS= read -r f; do