Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

Commit

Permalink
formula_pin: use installed_prefixes/installed_kegs
Browse files Browse the repository at this point in the history
  • Loading branch information
xu-cheng committed Nov 29, 2015
1 parent decfded commit 4f55f53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/formula_pin.rb
Expand Up @@ -18,7 +18,7 @@ def pin_at(version)
end

def pin
pin_at(@f.rack.subdirs.map { |d| Keg.new(d).version }.max)
pin_at(@f.installed_kegs.map { |keg| keg.version }.max)
end

def unpin
Expand All @@ -31,7 +31,7 @@ def pinned?
end

def pinnable?
@f.rack.exist? && @f.rack.subdirs.length > 0
@f.installed_prefixes.any?
end

def pinned_version
Expand Down

0 comments on commit 4f55f53

Please sign in to comment.