--HEAD checks
* Force --HEAD for head-only installs * Don't allow --HEAD for stable-only formulae
This commit is contained in:
parent
a68152fc7d
commit
e65649aeb0
@ -88,6 +88,16 @@ module Homebrew extend self
|
|||||||
# command line may have been installed to satisfy a dependency.
|
# command line may have been installed to satisfy a dependency.
|
||||||
next if f.installed? unless ARGV.force?
|
next if f.installed? unless ARGV.force?
|
||||||
|
|
||||||
|
# Building head-only without --HEAD is an error
|
||||||
|
if not ARGV.build_head? and f.stable.nil?
|
||||||
|
raise "This is a head-only formula; install with `brew install --HEAD #{f.name}`"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Building stable-only with --HEAD is an error
|
||||||
|
if ARGV.build_head? and f.unstable.nil?
|
||||||
|
raise "No head is defined for #{f.name}"
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
fi = FormulaInstaller.new(f)
|
fi = FormulaInstaller.new(f)
|
||||||
fi.install
|
fi.install
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user