Build relative paths using resolved_path and relative_path_from
This commit is contained in:
parent
9b60c1470a
commit
a0494441d3
@ -17,12 +17,12 @@ module Homebrew extend self
|
|||||||
cd HOMEBREW_REPOSITORY
|
cd HOMEBREW_REPOSITORY
|
||||||
git_init_if_necessary
|
git_init_if_necessary
|
||||||
|
|
||||||
tapped_formulae = Dir['Library/Formula/*'].map do |formula|
|
taps = HOMEBREW_LIBRARY.join("Taps")
|
||||||
path = Pathname.new formula
|
tapped_formulae = []
|
||||||
|
HOMEBREW_LIBRARY.join("Formula").children.each do |path|
|
||||||
next unless path.symlink?
|
next unless path.symlink?
|
||||||
Pathname.new(path.realpath.to_s.gsub(/.*Taps\//, '')) rescue nil
|
tapped_formulae << path.resolved_path.relative_path_from(taps)
|
||||||
end
|
end
|
||||||
tapped_formulae.compact!
|
|
||||||
unlink_tap_formula(tapped_formulae)
|
unlink_tap_formula(tapped_formulae)
|
||||||
|
|
||||||
report = Report.new
|
report = Report.new
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user