diff options
| author | Jack Nagel | 2014-03-01 17:49:57 -0600 |
|---|---|---|
| committer | Jack Nagel | 2014-03-01 17:49:57 -0600 |
| commit | 51bec382b03574d71797d18a03a035f7bdc55f80 (patch) | |
| tree | c691dd95f72abd9792e99efcaf83716d38408841 /Library | |
| parent | 281494c2556febe95fe64357577cd713846fcbf4 (diff) | |
| download | brew-51bec382b03574d71797d18a03a035f7bdc55f80.tar.bz2 | |
Make conditional more obvious
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index c632fba2e..1a7b0dc69 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -394,9 +394,12 @@ class Formula if name =~ %r{(.+)/(.+)/(.+)} tap_name = "#$1-#$2".downcase tapd = Pathname.new("#{HOMEBREW_LIBRARY}/Taps/#{tap_name}") - tapd.find_formula do |relative_pathname| - return "#{tapd}/#{relative_pathname}" if relative_pathname.stem.to_s == $3 - end if tapd.directory? + + if tapd.directory? + tapd.find_formula do |relative_pathname| + return "#{tapd}/#{relative_pathname}" if relative_pathname.stem.to_s == $3 + end + end end # Otherwise don't resolve paths or URLs return name |
