diff options
| author | Jack Nagel | 2014-06-16 13:38:14 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-06-16 18:39:59 -0500 |
| commit | 1b3b61ff08a4ee5979838f7dbc171e9b38e83f7c (patch) | |
| tree | ca7cdebc960fe37e618b294d4f59eb49d26090bb /Library/Homebrew/cmd | |
| parent | 122f5e2d2ffc45bd477839d92b78607a0caf9865 (diff) | |
| download | homebrew-1b3b61ff08a4ee5979838f7dbc171e9b38e83f7c.tar.bz2 | |
Move head-only checks to cmd/install
Fixes #30084.
Closes #30203.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index d975f485c..ca228e338 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -24,6 +24,21 @@ module Homebrew extend self end end unless ARGV.force? + ARGV.formulae.each do |f| + # Building head-only without --HEAD is an error + if not ARGV.build_head? and f.stable.nil? + raise CannotInstallFormulaError, <<-EOS.undent + #{f} is a head-only formula + Install with `brew install --HEAD #{f.name}` + EOS + end + + # Building stable-only with --HEAD is an error + if ARGV.build_head? and f.head.nil? + raise CannotInstallFormulaError, "No head is defined for #{f.name}" + end + end + perform_preinstall_checks begin |
