aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/options.rb3
-rw-r--r--Library/Homebrew/formula.rb5
2 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb
index 040c4a74b..530c88167 100644
--- a/Library/Homebrew/cmd/options.rb
+++ b/Library/Homebrew/cmd/options.rb
@@ -32,8 +32,7 @@ module Homebrew extend self
def dump_options_for_formula f
f.build.each do |k,v|
- k.prepend "--" unless k.start_with? "--"
- puts k
+ puts "--"+k
puts "\t"+v
end
end
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 9cf1660dd..710a084c1 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -58,7 +58,10 @@ class Formula
@downloader = download_strategy.new(name, @active_spec)
# Combine DSL `option` and `def options`
- options.each {|o| self.class.build.add(o[0], o[1]) }
+ options.each do |opt, desc|
+ # make sure to strip "--" from the start of options
+ self.class.build.add opt[/--(.+)$/, 1], desc
+ end
end
def url; @active_spec.url; end