aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/diagnostic.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/Library/Homebrew/diagnostic.rb b/Library/Homebrew/diagnostic.rb
index 394b766ae..f2260ed03 100644
--- a/Library/Homebrew/diagnostic.rb
+++ b/Library/Homebrew/diagnostic.rb
@@ -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