Merge pull request #800 from zmwangx/set-TMPDIR-TEMP-TMP-to-HOMEBREW_TEMP

config: set TMPDIR, TEMP and TMP to HOMEBREW_TEMP
This commit is contained in:
Mike McQuaid 2016-08-25 10:37:07 +01:00 committed by GitHub
commit df21e57179

View File

@ -35,6 +35,11 @@ HOMEBREW_LOGS = Pathname.new(ENV["HOMEBREW_LOGS"] || "~/Library/Logs/Homebrew/")
# Must use /tmp instead of $TMPDIR because long paths break Unix domain sockets
HOMEBREW_TEMP = Pathname.new(ENV.fetch("HOMEBREW_TEMP", "/tmp"))
# Set common tmpdir environment variables to HOMEBREW_TEMP
ENV["TMPDIR"] = HOMEBREW_TEMP
ENV["TEMP"] = HOMEBREW_TEMP
ENV["TMP"] = HOMEBREW_TEMP
unless defined? HOMEBREW_LIBRARY_PATH
# Root of the Homebrew code base
HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent