From 580ccab75db1e9f3496dba7ab88dfe1c94b9d67d Mon Sep 17 00:00:00 2001 From: EricFromCanada Date: Wed, 13 May 2020 00:37:37 -0400 Subject: [PATCH] formula JSON: include URLs for non-bottled formulae --- Library/Homebrew/formula.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index c33d151c9c..5cb9d94e27 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1716,6 +1716,13 @@ class Formula %w[stable devel].each do |spec_sym| next unless spec = send(spec_sym) + + hsh["urls"][spec_sym] = { + "url" => spec.url, + "tag" => spec.specs[:tag], + "revision" => spec.specs[:revision], + } + next unless spec.bottle_defined? bottle_spec = spec.bottle_specification @@ -1735,11 +1742,6 @@ class Formula } end hsh["bottle"][spec_sym] = bottle_info - hsh["urls"][spec_sym] = { - "url" => spec.url, - "tag" => spec.specs[:tag], - "revision" => spec.specs[:revision], - } end hsh["options"] = options.map do |opt|