formula: always override user home
Closes Homebrew/homebrew#40444. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
b9cdfe21fc
commit
ac523bac06
@ -946,8 +946,17 @@ class Formula
|
||||
def stage
|
||||
active_spec.stage do
|
||||
@buildpath = Pathname.pwd
|
||||
env_home = buildpath/".brew_home"
|
||||
mkdir_p env_home
|
||||
|
||||
old_home, ENV["HOME"] = ENV["HOME"], env_home
|
||||
|
||||
begin
|
||||
yield
|
||||
ensure
|
||||
@buildpath = nil
|
||||
ENV["HOME"] = old_home
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user