From a0494441d3be30229f5d9082244afc0e54f363d7 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 25 Apr 2014 12:34:28 -0500 Subject: Build relative paths using resolved_path and relative_path_from --- Library/Homebrew/cmd/update.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Library') 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 -- cgit v1.2.3