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
|
def stage
|
||||||
active_spec.stage do
|
active_spec.stage do
|
||||||
@buildpath = Pathname.pwd
|
@buildpath = Pathname.pwd
|
||||||
yield
|
env_home = buildpath/".brew_home"
|
||||||
@buildpath = nil
|
mkdir_p env_home
|
||||||
|
|
||||||
|
old_home, ENV["HOME"] = ENV["HOME"], env_home
|
||||||
|
|
||||||
|
begin
|
||||||
|
yield
|
||||||
|
ensure
|
||||||
|
@buildpath = nil
|
||||||
|
ENV["HOME"] = old_home
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user