aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
diff options
context:
space:
mode:
authorJack Nagel2014-08-11 17:48:30 -0500
committerJack Nagel2014-08-11 17:48:30 -0500
commite5589b6cd6780481144b28c3dcb78ce1155e9756 (patch)
treed2316e2c3bad8adb13a9f5300f8418b0d877ac68 /Library/Homebrew/formula_installer.rb
parent800051d65ea23f1431517c5b780003ba40a4a562 (diff)
downloadhomebrew-e5589b6cd6780481144b28c3dcb78ce1155e9756.tar.bz2
Replace the build object rather than mutate it
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
-rw-r--r--Library/Homebrew/formula_installer.rb12
1 files changed, 3 insertions, 9 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 63b7fa0df..266d005a2 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -303,15 +303,9 @@ class FormulaInstaller
end
def effective_build_options_for(dependent, inherited_options=[])
- if dependent == f
- build = dependent.build.dup
- build.args |= options
- build
- else
- build = dependent.build.dup
- build.args |= inherited_options
- build
- end
+ args = dependent.build.used_options
+ args |= dependent == f ? options : inherited_options
+ BuildOptions.new(args, dependent.options)
end
def inherited_options_for(dep)