aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXu Cheng2015-11-29 15:38:40 +0800
committerXu Cheng2015-11-29 20:24:30 +0800
commitfade4af0502743410c98fa5de59a1657e1f3c4a8 (patch)
treeec48567dfde6a68b0227507a662b24b6ea2d34c7
parent863c83a0f525d877fc2a66236600f7247eb648a6 (diff)
downloadbrew-fade4af0502743410c98fa5de59a1657e1f3c4a8.tar.bz2
formula_pin: use installed_prefixes/installed_kegs
-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