From e871a9195890cc3cceccaa8d1d9e6a3e0ac20eae Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Mon, 5 Jan 2015 02:36:03 +0000 Subject: [PATCH] install: fail on devel where devel doesn't exist MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just equalises a little how we treat HEAD and devel. The former already fails if there isn’t a head defined, It seemed logical that devel should fail in the same way. Closes Homebrew/homebrew#35554. Signed-off-by: Jack Nagel --- Library/Homebrew/cmd/install.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 7687591483..8ac532a975 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -53,6 +53,11 @@ module Homebrew raise "No head is defined for #{f.name}" end + # Building stable-only with --devel is an error + if ARGV.build_devel? and f.devel.nil? + raise "No devel block is defined for #{f.name}" + end + if f.installed? msg = "#{f.name}-#{f.installed_version} already installed" msg << ", it's just not linked" unless f.linked_keg.symlink? or f.keg_only?