From 0cf11ca4cf27376f85e6dcb4370283d7be710d45 Mon Sep 17 00:00:00 2001 From: damien cavagnini Date: Fri, 1 Aug 2025 11:37:36 +0200 Subject: [PATCH] bring back missing "check_is_executable.sh" precommit --- .pre-commit-config.yaml | 7 +++++++ hooks/check_is_executable.sh | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100755 hooks/check_is_executable.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f98f44e..dbb73cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,3 +22,10 @@ repos: language: script pass_filenames: true files: "^(bin|tests)/hardening/" + - id: check_is_executable + name: check_is_executable.sh + description: Ensure checks are executables + entry: hooks/check_is_executable.sh + language: script + pass_filenames: true + files: "^bin/hardening/" diff --git a/hooks/check_is_executable.sh b/hooks/check_is_executable.sh new file mode 100755 index 0000000..f3ca2db --- /dev/null +++ b/hooks/check_is_executable.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +for script in "$@"; do + chmod +x "$script" +done + +exit 0