aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-08-28 23:54:00 -0500
committerJack Nagel2014-08-28 23:54:00 -0500
commit7adbb1ccb9f060c4f6b47644b34369c56b9d28f6 (patch)
tree8c2ab913486b957dbe586995885bb93c3ca0f78f /Library/Homebrew
parentdb04b04135475690004c674f93aae17a4db5f845 (diff)
downloadbrew-7adbb1ccb9f060c4f6b47644b34369c56b9d28f6.tar.bz2
Single character options should not be used in a formula
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/software_spec.rb3
1 files changed, 2 insertions, 1 deletions
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