From db21a9783cd77ce2241bb36fefb97edbc8a08005 Mon Sep 17 00:00:00 2001 From: Matthias Kay Date: Thu, 9 Jan 2025 19:57:31 +0100 Subject: [PATCH] PRE-COMMIT --- update_workflows.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/update_workflows.sh b/update_workflows.sh index c6a8d96..6046ecc 100755 --- a/update_workflows.sh +++ b/update_workflows.sh @@ -10,6 +10,11 @@ repository_path=$(pwd) branch_name="update-workflows-$(date +%s)" function ensure_prerequisites_or_exit() { + if ! command -v pre-commit &> /dev/null; then + echo "pre-commit is not installed. https://github.com/pre-commit/pre-commit" + exit 1 + fi + if ! command -v yq &> /dev/null; then echo "yq is not installed. https://github.com/mikefarah/yq" exit 1 @@ -350,6 +355,8 @@ do done done +pre-commit install -c .config/.pre-commit-config.yaml + create_commit_and_pr . rm -rf "$latest_template_path"