diff options
| author | Markus Reiter | 2017-03-12 19:18:41 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-03-16 12:10:19 +0100 |
| commit | d1995dad4bf76b447d9c97f1c2db99c6b3854b51 (patch) | |
| tree | 8cecf7abf6193d6429a43c8daeb6d71f009119b9 /Library/Homebrew/tap.rb | |
| parent | c4d8b1696c90fa54f0e2f4bce3c734f7a657662b (diff) | |
| download | brew-d1995dad4bf76b447d9c97f1c2db99c6b3854b51.tar.bz2 | |
Use a `Formulary`-like approach to load Casks.
Diffstat (limited to 'Library/Homebrew/tap.rb')
| -rw-r--r-- | Library/Homebrew/tap.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/tap.rb b/Library/Homebrew/tap.rb index 56e06834d..ba55e3cf6 100644 --- a/Library/Homebrew/tap.rb +++ b/Library/Homebrew/tap.rb @@ -285,7 +285,7 @@ class Tap # path to the directory of all {Formula} files for this {Tap}. def formula_dir - @formula_dir ||= potential_formula_dirs.detect(&:directory?) + @formula_dir ||= potential_formula_dirs.detect(&:directory?) || path/"Formula" end def potential_formula_dirs @@ -294,12 +294,12 @@ class Tap # path to the directory of all {Cask} files for this {Tap}. def cask_dir - @cask_dir ||= [path/"Casks"].detect(&:directory?) + @cask_dir ||= path/"Casks" end # an array of all {Formula} files of this {Tap}. def formula_files - @formula_files ||= if formula_dir + @formula_files ||= if formula_dir.directory? formula_dir.children.select(&method(:formula_file?)) else [] @@ -308,7 +308,7 @@ class Tap # an array of all {Cask} files of this {Tap}. def cask_files - @cask_files ||= if cask_dir + @cask_files ||= if cask_dir.directory? cask_dir.children.select(&method(:cask_file?)) else [] |
