mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Use with_env
This commit is contained in:
parent
a89f873e8f
commit
b1a543b2ad
@ -131,17 +131,16 @@ class Build
|
||||
keep_tmp: args.keep_tmp?,
|
||||
interactive: args.interactive?,
|
||||
) do
|
||||
with_env(
|
||||
# For head builds, HOMEBREW_FORMULA_PREFIX should include the commit,
|
||||
# which is not known until after the formula has been staged.
|
||||
ENV["HOMEBREW_FORMULA_PREFIX"] = formula.prefix
|
||||
|
||||
HOMEBREW_FORMULA_PREFIX: formula.prefix,
|
||||
# https://reproducible-builds.org/docs/source-date-epoch/
|
||||
ENV["SOURCE_DATE_EPOCH"] = formula.source_modified_time.to_i.to_s
|
||||
|
||||
SOURCE_DATE_EPOCH: formula.source_modified_time.to_i.to_s,
|
||||
# Avoid make getting confused about timestamps.
|
||||
# https://github.com/Homebrew/homebrew-core/pull/87470
|
||||
ENV["TZ"] = "UTC0"
|
||||
|
||||
TZ: "UTC0",
|
||||
) do
|
||||
formula.patch
|
||||
|
||||
if args.git?
|
||||
@ -183,6 +182,7 @@ class Build
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def detect_stdlibs
|
||||
keg = Keg.new(formula.prefix)
|
||||
|
Loading…
x
Reference in New Issue
Block a user