diff --git a/Library/Homebrew/cmd/options.rb b/Library/Homebrew/cmd/options.rb index 040c4a74b8..530c881677 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 9cf1660dd6..710a084c1f 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