Skip to content

Commit

Permalink
Setting default GIT configuration as test/ being HOME during tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spog committed Nov 17, 2024
1 parent e4f529e commit 8594a15
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/setup
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ fi
export XDG_CONFIG_HOME=$SCRIPT_DIR
export HOME=$SCRIPT_DIR
export GIT_CONFIG_NOSYSTEM=1
# Set global GIT configuration for tests:
if [ ! -f "${HOME}/.gitconfig" ]; then
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
git config --global init.defaultBranch "master"
git config --global --add safe.directory "$(pwd)"
fi
# To be able to view current GIT confirguration during tests execution,
# run the test suite by adding the '-v' option to the prove command.
git config --list
Expand Down

0 comments on commit 8594a15

Please sign in to comment.