From ef13fead6084eb01d6e21b8297115a53510126f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mateusz=20=C5=BBebrak?= <mzebrak@syncad.com>
Date: Thu, 4 Jul 2024 16:09:17 +0200
Subject: [PATCH] Add missing set -euo pipefail

---
 scripts/check_for_dangling_beekeeper.bash                    | 4 +++-
 scripts/check_is_private_key_nor_password_is_not_logged.bash | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/scripts/check_for_dangling_beekeeper.bash b/scripts/check_for_dangling_beekeeper.bash
index d04ed19d67..79c58587f0 100755
--- a/scripts/check_for_dangling_beekeeper.bash
+++ b/scripts/check_for_dangling_beekeeper.bash
@@ -1,6 +1,8 @@
 #!/bin/bash
 
-count=$(pgrep "beekeeper" -c)
+set -euo pipefail
+
+count=$(pgrep "beekeeper" --count || true)
 
 if [[ $count -gt 0 ]]; then
     echo "Error: There is dangling 'beekeeper' process left."
diff --git a/scripts/check_is_private_key_nor_password_is_not_logged.bash b/scripts/check_is_private_key_nor_password_is_not_logged.bash
index 67e3dd7941..604e9593e9 100755
--- a/scripts/check_is_private_key_nor_password_is_not_logged.bash
+++ b/scripts/check_is_private_key_nor_password_is_not_logged.bash
@@ -1,12 +1,14 @@
 #!/bin/bash
 
+set -euo pipefail
+
 function find_password_private_keys() {
     find . -path "*/clive/*/latest.log" -print0 |
     xargs -0 \
     grep --with-filename --line-number --ignore-case --word-regexp  --extended-regexp \
         '(pass(word)?|[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{51})' |
     grep "$@" --invert-match --extended-regexp \
-        '(Error in response from url|Problem occurred during communication with|test_tools.__private.logger)'
+        '(Error in response from url|Problem occurred during communication with|test_tools.__private.logger)' || true
 }
 
 amount_of_occurrences=$(find_password_private_keys --count)
-- 
GitLab