aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_pin.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_pin.rb b/Library/Homebrew/formula_pin.rb
index 7ecad9d7b..c9a195fdd 100644
--- a/Library/Homebrew/formula_pin.rb
+++ b/Library/Homebrew/formula_pin.rb
@@ -18,7 +18,7 @@ class FormulaPin
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
@@ -31,7 +31,7 @@ class FormulaPin
end
def pinnable?
- @f.rack.exist? && @f.rack.subdirs.length > 0
+ @f.installed_prefixes.any?
end
def pinned_version