aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2014-03-10 14:56:02 -0500
committerJack Nagel2014-03-10 14:56:02 -0500
commit330d165e0fd4fb69d998c23ba67d28c0e8f0176e (patch)
tree79cf82aa8dba87a9e2060acca5954edb62af8e08
parent307caebc088eafb8971a44e8130ace75ce801e17 (diff)
downloadhomebrew-330d165e0fd4fb69d998c23ba67d28c0e8f0176e.tar.bz2
Update info command for generalized bottle implementation
-rw-r--r--Library/Homebrew/cmd/info.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb
index 863138b89..8905b0f83 100644
--- a/Library/Homebrew/cmd/info.rb
+++ b/Library/Homebrew/cmd/info.rb
@@ -77,10 +77,19 @@ module Homebrew extend self
def info_formula f
specs = []
- stable = "stable #{f.stable.version}" if f.stable
- stable += " (bottled)" if f.bottle
- specs << stable if stable
- specs << "devel #{f.devel.version}" if f.devel
+
+ if stable = f.stable
+ s = "stable #{stable.version}"
+ s += " (bottled)" if stable.bottled?
+ specs << s
+ end
+
+ if devel = f.devel
+ s = "devel #{stable.version}"
+ s += " (bottled)" if devel.bottled?
+ specs << s
+ end
+
specs << "HEAD" if f.head
puts "#{f.name}: #{specs*', '}#{' (pinned)' if f.pinned?}"