From 2bff617aa5477739fd03ff832906772f210e7970 Mon Sep 17 00:00:00 2001 From: Rd Date: Wed, 4 Sep 2024 18:47:28 +0530 Subject: [PATCH] Running with the checked in image --- .github/workflows/static_checks.yml | 2 -- scripts/pre-commit.sh | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml index 2b0c463cfde..2ab0251a5bf 100644 --- a/.github/workflows/static_checks.yml +++ b/.github/workflows/static_checks.yml @@ -164,8 +164,6 @@ jobs: if [ $exit_code -eq 0 ]; then echo "No binary files found" echo "BINARY FILES CHECK PASSED" - else - echo "BINARY FILES CHECK FAILED" fi - name: Regex Patterns Validation Check diff --git a/scripts/pre-commit.sh b/scripts/pre-commit.sh index 3ee5a6c0076..6ece5c62f15 100644 --- a/scripts/pre-commit.sh +++ b/scripts/pre-commit.sh @@ -13,6 +13,7 @@ changed_files=$(git diff --name-only "$base_commit" HEAD) # Combine both lists of files, ensuring no duplicates all_files=$(echo -e "$staged_files\n$changed_files" | sort -u) +echo "$all_files" function checkForBinaries() { binaryFilesCount=0 @@ -28,6 +29,7 @@ function checkForBinaries() { if [[ -n "${binaryFiles}" && "${binaryFilesCount}" -gt 0 ]]; then printf "\nPlease remove the following binary file(s):\n\n" printf "\033[33m%b\033[0m\n" "$binaryFiles" + printf "BINARY FILES CHECK FAILED\n" exit 1 fi }