Skip to content

Commit

Permalink
Raise when formula name is empty
Browse files Browse the repository at this point in the history
P.S. That still doesn't check if the name is invalid, like "34"
  • Loading branch information
abitrolly committed Nov 23, 2023
1 parent d8f19ff commit 4fed452
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Library/Homebrew/formula_creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def head?
end

def write_formula!
raise "name should not be empty" if @name.to_s == ''
path = @tap.new_formula_path(@name)
raise "#{path} already exists" if path.exist?

Expand Down

0 comments on commit 4fed452

Please sign in to comment.