mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
tests: set HOME.
This is the only way to override the user's Git configuration which can break tests when e.g. `gpg` cannot be found but signing is requested.
This commit is contained in:
parent
794fe5d21d
commit
c46cecf277
@ -49,6 +49,10 @@ module Homebrew
|
||||
ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if args.generic?
|
||||
ENV["HOMEBREW_TEST_ONLINE"] = "1" if args.online?
|
||||
|
||||
# Avoid local configuration messing with tests e.g. git being configured
|
||||
# to use GPG to sign by default
|
||||
ENV["HOME"] = "#{HOMEBREW_LIBRARY_PATH}/test"
|
||||
|
||||
if args.coverage?
|
||||
ENV["HOMEBREW_TESTS_COVERAGE"] = "1"
|
||||
FileUtils.rm_f "test/coverage/.resultset.json"
|
||||
|
Loading…
x
Reference in New Issue
Block a user