From e57e1a6252a20ff33574ca59ca657a9097ad3638 Mon Sep 17 00:00:00 2001
From: downtownallday <downtownallday@gmail.com>
Date: Wed, 4 May 2022 11:19:46 -0400
Subject: [PATCH] add miab directory as 'safe' for git

---
 tests/system-setup/setup-funcs.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/system-setup/setup-funcs.sh b/tests/system-setup/setup-funcs.sh
index 98080995..89d99260 100755
--- a/tests/system-setup/setup-funcs.sh
+++ b/tests/system-setup/setup-funcs.sh
@@ -140,11 +140,17 @@ init_miab_testing() {
     # python3-dnspython: is used by the python scripts in 'tests' and is
     #   not installed by setup
     # also install 'jq' for json processing
-    echo "Install python3-dnspython, jq"
+    echo "Install python3-dnspython, jq, git"
     wait_for_apt
-    exec_no_output apt-get install -y python3-dnspython jq \
+    exec_no_output apt-get install -y python3-dnspython jq git \
         || die "Unable to install setup prerequisites !!"
-    
+
+
+    # tell git our directory is safe (new requirement for git 2.35.2)
+    if [ -d .git ]; then
+        git config --global --add safe.directory "$(pwd)"
+    fi
+
     # copy in pre-built MiaB-LDAP ssl files
     #   1. avoid the lengthy generation of DH params
     if ! mkdir -p $STORAGE_ROOT/ssl; then