Skip to content
Snippets Groups Projects
Commit ac523bac authored by Dominyk Tiller's avatar Dominyk Tiller Committed by Mike McQuaid
Browse files

formula: always override user home


Closes Homebrew/homebrew#40444.

Signed-off-by: default avatarMike McQuaid <mike@mikemcquaid.com>
parent b9cdfe21
No related branches found
No related tags found
No related merge requests found
......@@ -946,8 +946,17 @@ class Formula
def stage
active_spec.stage do
@buildpath = Pathname.pwd
yield
@buildpath = nil
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment