diff options
Diffstat (limited to 'Library/Homebrew/cmd/readall.rb')
| -rw-r--r-- | Library/Homebrew/cmd/readall.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb index e628cb090..9fac52713 100644 --- a/Library/Homebrew/cmd/readall.rb +++ b/Library/Homebrew/cmd/readall.rb @@ -14,16 +14,8 @@ module Homebrew def readall if ARGV.include?("--syntax") - ruby_files = [] - scan_files = %W[ - #{HOMEBREW_LIBRARY}/*.rb - #{HOMEBREW_LIBRARY}/Homebrew/**/*.rb - ] - Dir.glob(scan_files).each do |rb| - next if rb.include?("/vendor/") - next if rb.include?("/cask/") - ruby_files << rb - end + scan_files = "#{HOMEBREW_LIBRARY_PATH}/**/*.rb" + ruby_files = Dir.glob(scan_files).reject { |file| file =~ %r{/(vendor|cask)/} } Homebrew.failed = true unless Readall.valid_ruby_syntax?(ruby_files) end |
