Skip to content
Snippets Groups Projects
Commit a0494441 authored by Jack Nagel's avatar Jack Nagel
Browse files

Build relative paths using resolved_path and relative_path_from

parent 9b60c147
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment