Skip to content

Commit

Permalink
alr.py: ensure baseline git configuration in tests (#936)
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo authored Feb 14, 2022
1 parent e4fff7f commit 33edc47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions testsuite/drivers/alr.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ def prepare_env(config_dir, env):
This creates the `config_dir` directory and updates `env` (environment
variables) to point to it as alr's configuration directory.
"""

# Disable any user's git configuration to ensure reproducible git behavior.
# https://github.com/git/git/commit/4179b4897f2de28858acaebd6382c06c91532e98
env["GIT_CONFIG_GLOBAL"] = "/dev/null"
env["GIT_CONFIG_SYSTEM"] = "/dev/null"

config_dir = os.path.abspath(config_dir)
mkdir(config_dir)
env['ALR_CONFIG'] = config_dir
Expand Down

0 comments on commit 33edc47

Please sign in to comment.