Skip to content

Commit 6c09a59

Browse files
committed
Move parse_url call to FormulaCreator.new
To ensure it is called before `write!`
1 parent 186a3f5 commit 6c09a59

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

Library/Homebrew/dev-cmd/create.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ def create_formula
193193
fetch: !args.no_fetch?,
194194
head: args.HEAD?,
195195
)
196-
fc.parse_url
197196
# ask for confirmation if name wasn't passed explicitly
198197
if args.set_name.blank?
199198
print "Formula name [#{fc.name}]: "

Library/Homebrew/formula_creator.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def initialize(url:, name: nil, version: nil, tap: nil, mode: nil, license: nil,
2222
@license = license
2323
@fetch = fetch
2424
@head = head
25+
26+
parse_url
2527
end
2628

2729
sig { void }

Library/Homebrew/test/formula_creator_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
expect(t).to eq(test[:expected])
3434

3535
fc = described_class.new(url: test[:url])
36-
fc.parse_url
3736
expect(fc.name).to eq(test[:expected])
3837
end
3938
end

0 commit comments

Comments
 (0)