From c6dee041eb1d5a4412269a1543eb74415e5a3a88 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 15 Jan 2015 23:59:55 -0500 Subject: [PATCH] install: fix --HEAD for formulae with head and devel but no stable --- Library/Homebrew/cmd/install.rb | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 14bf24b509..1fb5a2f0eb 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -49,15 +49,15 @@ module Homebrew end # 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 + if not ARGV.build_devel? and f.stable.nil? and f.head.nil? + raise <<-EOS.undent + #{f.name} is a devel-only formula + Install with `brew install --devel #{f.name}` + EOS + end + + if ARGV.build_stable? and f.stable.nil? + raise "#{f.name} has no stable download, please choose --devel or --HEAD" end # --HEAD, fail with no head defined