Suggestion by @MikeMcQuaid

"ActiveSupport adds blank? to NilClass."
This commit is contained in:
Anatoli Babenia 2023-11-23 18:53:22 +03:00
parent bfbea8be26
commit 4063675e0e

View File

@ -50,7 +50,8 @@ module Homebrew
end end
def write_formula! def write_formula!
raise "name should not be empty" if @name.to_s == "" raise ArgumentError, "name is blank!" if @name.blank?
raise ArgumentError, "tap is blank!" if @tap.blank?
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?