diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/tab.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/tab.rb b/Library/Homebrew/tab.rb index efc746628..85252ab60 100644 --- a/Library/Homebrew/tab.rb +++ b/Library/Homebrew/tab.rb @@ -31,7 +31,11 @@ class Tab < OpenStruct end def self.from_file path - attributes = Utils::JSON.load(File.read(path)) + from_file_content(File.read(path), path) + end + + def self.from_file_content content, path + attributes = Utils::JSON.load(content) attributes["tabfile"] = path attributes["source"] ||= {} |
