From 83e8eb74e4f3c444578849a84f39cbe2478e48e4 Mon Sep 17 00:00:00 2001 From: Gabe <41127686+Zidious@users.noreply.github.com> Date: Mon, 7 Nov 2022 13:59:46 +0000 Subject: [PATCH] ci: ensure pre-commit hook works in release script (#267) --- scripts/pre-commit-hook.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pre-commit-hook.sh b/scripts/pre-commit-hook.sh index 3957377d..bffab339 100644 --- a/scripts/pre-commit-hook.sh +++ b/scripts/pre-commit-hook.sh @@ -14,7 +14,7 @@ fi cd .. # For reference: https://github.com/clibs/clib/blob/master/scripts/pre-commit-hook.sh#L3-L10 -function format_and_restage_file { +format_and_restage_file () { local file="$1" if [ -f "$file" ]; then java -jar .cache/google-java-format-1.7-all-deps.jar --replace $file @@ -25,4 +25,4 @@ function format_and_restage_file { # Format each staged file ending in .java for file in `git diff-index --cached --name-only HEAD | grep -iE '.*java$' ` ; do format_and_restage_file "$file" -done \ No newline at end of file +done