Skip to content
Snippets Groups Projects
Commit 4af8bdf1 authored by Mike McQuaid's avatar Mike McQuaid
Browse files

update-report: migrate all formulae every time.

Unmigrated formulae cause hard-to-debug issues and relying on detection
on Git alone is faster but not comprehensive. Instead, iterate through
renamed, installed formulae every time and migrate them.

Closes #1770.
parent 00af5250
No related branches found
No related tags found
No related merge requests found
......@@ -499,10 +499,14 @@ class Reporter
end
def migrate_formula_rename
report[:R].each do |old_full_name, new_full_name|
old_name = old_full_name.split("/").last
Formula.installed.map(&:oldname).compact.each do |old_name|
next unless (dir = HOMEBREW_CELLAR/old_name).directory? && !dir.subdirs.empty?
new_name = tap.formula_renames[old_name]
next unless new_name
new_full_name = "#{tap}/#{new_name}"
begin
f = Formulary.factory(new_full_name)
rescue Exception => e
......
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