From fe032e3e9682db3d428ae3b6a2d1d79d86a67f41 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Wed, 9 Dec 2015 12:09:55 +0800 Subject: avoid using FORMULA_RENAMES directly --- Library/Homebrew/cmd/audit.rb | 4 ++-- Library/Homebrew/cmd/update.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index ac85319bb..88e67c9b3 100644 --- a/Library/Homebrew/cmd/audit.rb +++ b/Library/Homebrew/cmd/audit.rb @@ -245,8 +245,8 @@ class FormulaAuditor return end - if FORMULA_RENAMES.key? name - problem "'#{name}' is reserved as the old name of #{FORMULA_RENAMES[name]}" + if oldname = CoreFormulaRepository.instance.formula_renames[name] + problem "'#{name}' is reserved as the old name of #{oldname}" return end diff --git a/Library/Homebrew/cmd/update.rb b/Library/Homebrew/cmd/update.rb index f4cd9d712..39a0371fb 100644 --- a/Library/Homebrew/cmd/update.rb +++ b/Library/Homebrew/cmd/update.rb @@ -422,7 +422,7 @@ class Report next unless newname = Tap.fetch($1, $2).formula_renames[oldname] else oldname = path.basename(".rb").to_s - next unless newname = FORMULA_RENAMES[oldname] + next unless newname = CoreFormulaRepository.instance.formula_renames[oldname] end if fetch(:A, []).include?(newpath = path.dirname.join("#{newname}.rb")) -- cgit v1.2.3