aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/dependency.rb
diff options
context:
space:
mode:
authorJack Nagel2014-08-11 17:48:30 -0500
committerJack Nagel2014-08-11 17:48:30 -0500
commitb7b8b88cea98ed4b24b813f13d7b06b538090fa6 (patch)
tree1206e0721ffadbcf25c2d44740b22c2a69ad2a80 /Library/Homebrew/dependency.rb
parent0b468c528c9207b2e43455f02e3042080abd19ca (diff)
downloadbrew-b7b8b88cea98ed4b24b813f13d7b06b538090fa6.tar.bz2
Replace the build object rather than mutate it
Diffstat (limited to 'Library/Homebrew/dependency.rb')
-rw-r--r--Library/Homebrew/dependency.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/Library/Homebrew/dependency.rb b/Library/Homebrew/dependency.rb
index d3e8b607a..dfb337446 100644
--- a/Library/Homebrew/dependency.rb
+++ b/Library/Homebrew/dependency.rb
@@ -29,10 +29,9 @@ class Dependency
end
def to_formula
- f = Formulary.factory(name)
- # Add this dependency's options to the formula's build args
- f.build.args = f.build.args.concat(options)
- f
+ formula = Formulary.factory(name)
+ formula.build = BuildOptions.new(options, formula.options)
+ formula
end
def installed?