提交 839a5f38 编写于 作者: M Mislav Marohnić

Ignore `XDG_CONFIG_*` environment variables in tests

This avoids polluting the user's home environment.
https://github.com/github/hub/pull/1705#issuecomment-392759921
上级 591ffc39
......@@ -36,6 +36,9 @@ Before do
set_env 'GIT_PROXY_COMMAND', 'echo'
# avoids reading from current user's "~/.gitconfig"
set_env 'HOME', File.expand_path(File.join(current_dir, 'home'))
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables
set_env 'XDG_CONFIG_HOME', nil
set_env 'XDG_CONFIG_DIRS', nil
# used in fakebin/git
set_env 'HUB_SYSTEM_GIT', system_git
# ensure that api.github.com is actually never hit in tests
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册