config: handle HOMEBREW_TEMP being unset.
This can happen when updating from a previous version of Homebrew.
This commit is contained in:
parent
0dcf753666
commit
1424b20a3d
@ -40,7 +40,9 @@ 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 = begin
|
||||
tmp = Pathname.new(ENV["HOMEBREW_TEMP"])
|
||||
# /tmp fallback is here for people auto-updating from a version where
|
||||
# HOMEBREW_TEMP isn't set.
|
||||
tmp = Pathname.new(ENV["HOMEBREW_TEMP"] || "/tmp")
|
||||
tmp.mkpath unless tmp.exist?
|
||||
tmp.realpath
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user