From f37f8b5c7ac97f5c370c55d3c2a447766bdc90c2 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Sat, 26 Dec 2015 13:15:29 +0800 Subject: [PATCH] bottle: prevent bottling formula outside core or taps Closes Homebrew/homebrew#47233. --- Library/Homebrew/cmd/bottle.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 4c629cdbbb..83f1147c52 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -149,6 +149,10 @@ module Homebrew return ofail "Formula not installed or up-to-date: #{f.full_name}" end + unless f.tap + return ofail "Formula not from core or any taps: #{f.full_name}" + end + if f.bottle_disabled? ofail "Formula has disabled bottle: #{f.full_name}" puts f.bottle_disable_reason