mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-14 20:39:55 -05:00
Unset XDG_CONFIG_HOME and related variables during tests
If set by the user's environment, `git config --global` writes will go to that destination instead of temporary $HOME. We definitely don't want that. Fixes #742
This commit is contained in:
parent
c43928a8e4
commit
3a265c1af9
1 changed files with 3 additions and 0 deletions
|
@ -22,6 +22,9 @@ if [ "$RBENV_ROOT" != "${RBENV_TEST_DIR}/root" ]; then
|
|||
PATH="${BATS_TEST_DIRNAME}/libexec:$PATH"
|
||||
PATH="${RBENV_ROOT}/shims:$PATH"
|
||||
export PATH
|
||||
|
||||
for xdg_var in `env 2>/dev/null | grep ^XDG_ | cut -d= -f1`; do unset "$xdg_var"; done
|
||||
unset xdg_var
|
||||
fi
|
||||
|
||||
teardown() {
|
||||
|
|
Loading…
Reference in a new issue