From ae0b527d54f1660a8917ffd4cb02b8b5cdcf7c18 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 28 Aug 2014 23:54:00 -0500 Subject: Single character options should not be used in a formula --- Library/Homebrew/software_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/software_spec.rb') diff --git a/Library/Homebrew/software_spec.rb b/Library/Homebrew/software_spec.rb index 113230247..bce6c7d84 100644 --- a/Library/Homebrew/software_spec.rb +++ b/Library/Homebrew/software_spec.rb @@ -92,7 +92,8 @@ class SoftwareSpec name = name.to_s end raise ArgumentError, "option name is required" if name.empty? - raise ArgumentError, "options should not start with dashes" if name.start_with?("-") + raise ArgumentError, "option name must be longer than one character" unless name.length > 1 + raise ArgumentError, "option name must not start with dashes" if name.start_with?("-") Option.new(name, description) end options << opt -- cgit v1.2.3