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

diagnostic: handle HOMEBREW_TEMP mktmpdir failure.

Fixes #1223.
parent d8c500cb
No related branches found
No related tags found
No related merge requests found
......@@ -644,13 +644,18 @@ module Homebrew
real_cellar = HOMEBREW_CELLAR.realpath
where_cellar = volumes.which real_cellar
tmp = Pathname.new(Dir.mktmpdir("doctor", HOMEBREW_TEMP))
begin
real_tmp = tmp.realpath.parent
where_tmp = volumes.which real_tmp
ensure
Dir.delete tmp
tmp = Pathname.new(Dir.mktmpdir("doctor", HOMEBREW_TEMP))
begin
real_tmp = tmp.realpath.parent
where_tmp = volumes.which real_tmp
ensure
Dir.delete tmp
end
rescue
return
end
return if where_cellar == where_tmp
<<-EOS.undent
......
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