aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
diff options
context:
space:
mode:
authorJack Nagel2014-06-19 21:35:47 -0500
committerJack Nagel2014-06-20 21:32:36 -0500
commit53bbbb1aff1f6399834c4c8818f4144923af5f35 (patch)
tree10fd56e2f494b3050bc85576cfbf24fd16e37d04 /Library/Homebrew/formula_installer.rb
parent56c89c48b9a4b6cd57fd9b7bec2da11fc9faa24a (diff)
downloadhomebrew-53bbbb1aff1f6399834c4c8818f4144923af5f35.tar.bz2
Decouple spec selection from ARGV
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
-rw-r--r--Library/Homebrew/formula_installer.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index e96ac69e9..b53632993 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -471,8 +471,11 @@ class FormulaInstaller
args << "--debug" if debug?
args << "--cc=#{ARGV.cc}" if ARGV.cc
args << "--env=#{ARGV.env}" if ARGV.env
- args << "--HEAD" if ARGV.build_head?
- args << "--devel" if ARGV.build_devel?
+
+ case f.active_spec
+ when f.head then args << "--HEAD"
+ when f.devel then args << "--devel"
+ end
f.build.each do |opt, _|
name = opt.name[/\A(.+)=\z$/, 1]