From 6c72ab77996149f807345547b0e0fba5be31c4bb Mon Sep 17 00:00:00 2001 From: Stefan Zweifel Date: Wed, 25 Nov 2020 20:21:26 +0100 Subject: [PATCH] Use git config --global to setup repo --- tests/git-auto-commit.bats | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/git-auto-commit.bats b/tests/git-auto-commit.bats index 72d0195..e3ad7e5 100644 --- a/tests/git-auto-commit.bats +++ b/tests/git-auto-commit.bats @@ -62,8 +62,10 @@ _setup_local_repository() { cd "${FAKE_LOCAL_REPOSITORY}"; # Configure Git - git config user.email "test@github.com" - git config user.name "Test Suite" + if [[ -z $(git config user.name) ]]; then + git config --global user.email "test@github.com" + git config --global user.name "Test Suite" + fi } # Run the main code related to this GitHub Action