This is an automated email from the ASF dual-hosted git repository.

aw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/yetus.git


The following commit(s) were added to refs/heads/main by this push:
     new bc2a24c  YETUS-1153. IBM's detect-secrets annoyingly checks for 
updated versions (#247)
bc2a24c is described below

commit bc2a24c38c27bce10e8274977ea543525f2effa9
Author: Allen Wittenauer <[email protected]>
AuthorDate: Wed Dec 29 14:32:06 2021 -0800

    YETUS-1153. IBM's detect-secrets annoyingly checks for updated versions 
(#247)
---
 precommit/src/main/shell/plugins.d/detsecrets.sh | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/precommit/src/main/shell/plugins.d/detsecrets.sh 
b/precommit/src/main/shell/plugins.d/detsecrets.sh
index 3c5e9f2..68d7f41 100755
--- a/precommit/src/main/shell/plugins.d/detsecrets.sh
+++ b/precommit/src/main/shell/plugins.d/detsecrets.sh
@@ -169,11 +169,13 @@ function detsecrets_executor
   detsecrets_convert_json_to_flat "${repostatus}"
 
   if [[ -f ${PATCH_DIR}/${detsecretsStderr} ]]; then
-    # shellcheck disable=SC2016
-    count=$(wc -l "${PATCH_DIR}/${detsecretsStderr}" | "${AWK}" '{print $1}')
-    if [[ ${count} -gt 0 ]]; then
-      add_vote_table_v2 -1 detsecrets "@@BASE@@/${detsecretsStderr}" "Error 
running detsecrets. Please check detsecrets stderr files."
-      return 1
+    if ! "${GREP}" -q "outdated version" "${PATCH_DIR}/${detsecretsStderr}"; 
then
+      # shellcheck disable=SC2016
+      count=$(wc -l "${PATCH_DIR}/${detsecretsStderr}" | "${AWK}" '{print $1}')
+      if [[ ${count} -gt 0 ]]; then
+        add_vote_table_v2 -1 detsecrets "@@BASE@@/${detsecretsStderr}" "Error 
running detsecrets. Please check detsecrets stderr files."
+        return 1
+      fi
     fi
   fi
   rm "${PATCH_DIR}/${detsecretsStderr}" 2>/dev/null

Reply via email to