Update git config if not set yet

This commit is contained in:
Stefan Zweifel 2020-09-13 14:18:41 +02:00
parent 961d68003e
commit 8c26230a11

View File

@ -13,7 +13,13 @@ setup() {
git init --quiet git init --quiet
git add . > /dev/null 2>&1 git add . > /dev/null 2>&1
git -c user.name="Test Suite" -c user.email="test@github.com" commit --quiet -m "Init Repo"
if [[ -z $(git config user.name) ]]; then
git config --global user.email "test@github.com"
git config --global user.name "Test Suite"
fi
git commit --quiet -m "Init Repo"
# Set default INPUT variables # Set default INPUT variables
export INPUT_REPOSITORY="${BATS_TEST_DIRNAME}/test_repo" export INPUT_REPOSITORY="${BATS_TEST_DIRNAME}/test_repo"