diff options
| author | Mike McQuaid | 2017-12-15 10:05:43 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2017-12-15 10:05:43 +0000 |
| commit | 65e719db25290653f3953eca76897bbb1ba746e2 (patch) | |
| tree | 073b218bdbe4ed3100cccb14bf1422eeb251731b /Library/Homebrew | |
| parent | 0cbe1f3a0516261acb8be339c5a9511be92d3ed7 (diff) | |
| download | brew-65e719db25290653f3953eca76897bbb1ba746e2.tar.bz2 | |
post_install: use HOMEBREW_PATH.
Do this instead of appending the `HOMEBREW_PREFIX` as it's more
reliable at finding e.g. keg-only and requirement PATH additions. It's
not ideal as it overrides some environment filtering but the only real
alternative is recreate the entire build environment by shelling out to
`build.rb` in `formula_installer`.
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/formula.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index ef545421a..8e4f80260 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -956,16 +956,13 @@ class Formula @prefix_returns_versioned_prefix = true build = self.build self.build = Tab.for_formula(self) - path_with_prefix = PATH.new(ENV["PATH"]) - .append(HOMEBREW_PREFIX/"bin") - .append(HOMEBREW_PREFIX/"sbin") new_env = { "TMPDIR" => HOMEBREW_TEMP, "TEMP" => HOMEBREW_TEMP, "TMP" => HOMEBREW_TEMP, "HOMEBREW_PATH" => nil, - "PATH" => path_with_prefix, + "PATH" => ENV["HOMEBREW_PATH"], } with_env(new_env) do |
