diff options
| author | Jack Nagel | 2014-04-25 12:34:28 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-25 12:34:37 -0500 |
| commit | a0494441d3be30229f5d9082244afc0e54f363d7 (patch) | |
| tree | 16acd06be18a9c6ee1b1be3f3b2d5f6be80ef5b1 /Library | |
| parent | 9b60c1470a04d6b54563ffa55e4002dfac6499fc (diff) | |
| download | brew-a0494441d3be30229f5d9082244afc0e54f363d7.tar.bz2 | |
Build relative paths using resolved_path and relative_path_from
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/update.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb index 85f305f0d..bd86bc8ba 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update.rb @@ -17,12 +17,12 @@ module Homebrew extend self cd HOMEBREW_REPOSITORY git_init_if_necessary - tapped_formulae = Dir['Library/Formula/*'].map do |formula| - path = Pathname.new formula + taps = HOMEBREW_LIBRARY.join("Taps") + tapped_formulae = [] + HOMEBREW_LIBRARY.join("Formula").children.each do |path| next unless path.symlink? - Pathname.new(path.realpath.to_s.gsub(/.*Taps\//, '')) rescue nil + tapped_formulae << path.resolved_path.relative_path_from(taps) end - tapped_formulae.compact! unlink_tap_formula(tapped_formulae) report = Report.new |
