Skip to content
Snippets Groups Projects
Commit 3f318b8e authored by Dominyk Tiller's avatar Dominyk Tiller Committed by Jack Nagel
Browse files

install: handle devel-only correctly

See the discussion in
https://github.com/Homebrew/homebrew-devel-only/pull/6



Closes Homebrew/homebrew#35793.

Signed-off-by: default avatarJack Nagel <jacknagel@gmail.com>
parent 3613f034
No related branches found
No related tags found
No related merge requests found
......@@ -40,20 +40,32 @@ module Homebrew
end
ARGV.formulae.each do |f|
# Building head-only without --HEAD is an error
if not ARGV.build_head? and f.stable.nil?
# head-only without --HEAD is an error
if not ARGV.build_head? and f.stable.nil? and f.devel.nil?
raise <<-EOS.undent
#{f.name} is a head-only formula
Install with `brew install --HEAD #{f.name}`
EOS
end
# Building stable-only with --HEAD is an error
# devel-only without --devel is an error
if not ARGV.build_devel? and f.stable.nil?
if f.head.nil?
raise <<-EOS.undent
#{f.name} is a devel-only formula
Install with `brew install --devel #{f.name}`
EOS
else
raise "#{f.name} has no stable download, please choose --devel or --HEAD"
end
end
# --HEAD, fail with no head defined
if ARGV.build_head? and f.head.nil?
raise "No head is defined for #{f.name}"
end
# Building stable-only with --devel is an error
# --devel, fail with no devel defined
if ARGV.build_devel? and f.devel.nil?
raise "No devel block is defined for #{f.name}"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment