diff options
| author | Jack Nagel | 2014-04-25 12:34:28 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-25 12:34:37 -0500 |
| commit | 127a89a32fc2f6fe758e8cbf1d74f92e5819c55e (patch) | |
| tree | bfdf42db2d528c89f8dc21c3e0e83e96c9e52994 /Library/Homebrew/cmd | |
| parent | e5f24ac7bef857a2b0a4d2787159c76c3fbbe0ad (diff) | |
| download | homebrew-127a89a32fc2f6fe758e8cbf1d74f92e5819c55e.tar.bz2 | |
Build relative paths using resolved_path and relative_path_from
Diffstat (limited to 'Library/Homebrew/cmd')
| -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 |
