aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/tab.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb
index c594843f6..984b587ff 100644
--- a/Library/Homebrew/tab.rb
+++ b/Library/Homebrew/tab.rb
@@ -28,7 +28,7 @@ class Tab < OpenStruct
"stdlib" => stdlib,
"source" => {
"path" => formula.path.to_s,
- "tap" => formula.tap,
+ "tap" => formula.tap ? formula.tap.name : nil,
"spec" => formula.active_spec_sym.to_s
}
}
@@ -116,7 +116,11 @@ class Tab < OpenStruct
else
tab = empty
tab.unused_options = f.options.as_flags
- tab.source = { "path" => f.path.to_s, "tap" => f.tap, "spec" => f.active_spec_sym.to_s }
+ tab.source = {
+ "path" => f.path.to_s,
+ "tap" => f.tap ? f.tap.name : f.tap,
+ "spec" => f.active_spec_sym.to_s,
+ }
end
tab
@@ -194,11 +198,13 @@ class Tab < OpenStruct
end
def tap
- source["tap"]
+ tap_name = source["tap"]
+ Tap.fetch(tap_name) if tap_name
end
def tap=(tap)
- source["tap"] = tap
+ tap_name = tap.respond_to?(:name) ? tap.name : tap
+ source["tap"] = tap_name
end
def spec