aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/doctor.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index fddbf31fb..374b66c2e 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -104,6 +104,8 @@ def check_for_macgpg2
end
def __check_stray_files(dir, pattern, white_list, message)
+ return unless Dir.exist?(dir)
+
files = Dir.chdir(dir) {
Dir[pattern].select { |f| File.file?(f) && !File.symlink?(f) }
}