lib/firebrew/firefox/extension.rb in firebrew-0.1.0 vs lib/firebrew/firefox/extension.rb in firebrew-0.1.1
- old
+ new
@@ -60,10 +60,12 @@
protected
def data_path
path = File.join(self.profile.path, 'extensions.json')
- raise Firebrew::ExtensionsFileNotFoundError unless File.exists? path
+ unless File.exists?(path) then
+ File.write(path, %({"schemaVersion": 16, "addons": []}))
+ end
path
end
def fetch
return @data if @data.present?