Merge pull request #5776 from sjackman/tests-user
tests: Set environment variable USER if not set
This commit is contained in:
commit
e1c12de1ba
@ -49,6 +49,8 @@ module Homebrew
|
||||
ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if args.generic?
|
||||
ENV["HOMEBREW_TEST_ONLINE"] = "1" if args.online?
|
||||
|
||||
ENV["USER"] ||= system_command!("id", args: ["-nu"]).stdout.chomp
|
||||
|
||||
# Avoid local configuration messing with tests e.g. git being configured
|
||||
# to use GPG to sign by default
|
||||
ENV["HOME"] = "#{HOMEBREW_LIBRARY_PATH}/test"
|
||||
|
Loading…
x
Reference in New Issue
Block a user