Raise when formula name is empty
P.S. That still doesn't check if the name is invalid, like "34"
This commit is contained in:
parent
d8f19ff881
commit
4fed4529d3
@ -50,6 +50,7 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
|
|
||||||
def write_formula!
|
def write_formula!
|
||||||
|
raise "name should not be empty" if @name.to_s == ''
|
||||||
path = @tap.new_formula_path(@name)
|
path = @tap.new_formula_path(@name)
|
||||||
raise "#{path} already exists" if path.exist?
|
raise "#{path} already exists" if path.exist?
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user