aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorUladzislau Shablinski2016-08-13 15:26:21 +0200
committerXu Cheng2016-08-13 21:26:21 +0800
commitb40b072ed8486f91f3951bdd19bea3f04af3e75b (patch)
tree5b64f92d59b195de94a120d20710dcef185032be /Library
parent1e76a207b5bfacebee0a7198318230446be8da47 (diff)
downloadbrew-b40b072ed8486f91f3951bdd19bea3f04af3e75b.tar.bz2
tab: fix Tab.for_formula versions (#687)
versions should be initialized even if formula is not installed
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/tab.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index 276fcfa05..d5a95e05d 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -138,6 +138,11 @@ class Tab < OpenStruct
"path" => f.path.to_s,
"tap" => f.tap ? f.tap.name : f.tap,
"spec" => f.active_spec_sym.to_s,
+ "versions" => {
+ "stable" => f.stable ? f.stable.version.to_s : nil,
+ "devel" => f.devel ? f.devel.version.to_s : nil,
+ "head" => f.head ? f.head.version.to_s : nil,
+ }
}
end