mirror of
https://github.com/gosticks/brew.git
synced 2026-10-06 23:46:56 +00:00
postinstall: add HOMEBREW_PREFIX/{,s}bin to PATH.
This avoids the need for workarounds such as: https://github.com/Homebrew/homebrew-core/pull/21688
This commit is contained in:
@@ -956,12 +956,16 @@ 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,
|
||||
}
|
||||
|
||||
with_env(new_env) do
|
||||
|
||||
Reference in New Issue
Block a user