Skip to content

Commit

Permalink
Fix for keg only
Browse files Browse the repository at this point in the history
  • Loading branch information
beeftornado committed Apr 23, 2018
1 parent 66c3b21 commit cc0667e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cmd/brew-rmtree.rb
Expand Up @@ -233,11 +233,10 @@ def find_active_formula(name)
latest_formula = Formulary.factory(name)
active_version = latest_formula.linked_version
active_prefix = latest_formula.installed_prefixes.last
active_formula = Formulary.factory("#{active_prefix}/.brew/#{name}.rb")
if active_formula.nil?
begin
return Formulary.factory("#{active_prefix}/.brew/#{name}.rb")
rescue
return latest_formula
else
return active_formula
end
end

Expand Down

0 comments on commit cc0667e

Please sign in to comment.