Skip to content
Snippets Groups Projects
Commit 1424b20a authored by Mike McQuaid's avatar Mike McQuaid
Browse files

config: handle HOMEBREW_TEMP being unset.

This can happen when updating from a previous version of Homebrew.
parent 0dcf7536
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment