aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formulary.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-05-28 15:54:05 +0100
committerMike McQuaid2016-05-28 15:54:05 +0100
commit6ba466f5d858c5e6f9d162c11ec03134df6e686e (patch)
tree8d2a6aed4f2582d8f20942a7544a970d8c797830 /Library/Homebrew/formulary.rb
parent9cf2710dc95f1c81e8c5111e22681836225e32e2 (diff)
downloadbrew-6ba466f5d858c5e6f9d162c11ec03134df6e686e.tar.bz2
Use JSON files for bottle upload data. (#166)
This means that we do not need to read formulae or evaluate Ruby at upload time.
Diffstat (limited to 'Library/Homebrew/formulary.rb')
-rw-r--r--Library/Homebrew/formulary.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/formulary.rb b/Library/Homebrew/formulary.rb
index d75f63425..8a436531c 100644
--- a/Library/Homebrew/formulary.rb
+++ b/Library/Homebrew/formulary.rb
@@ -16,6 +16,10 @@ class Formulary
end
def self.load_formula(name, path, contents, namespace)
+ if ENV["HOMEBREW_DISABLE_LOAD_FORMULA"]
+ raise "Formula loading disabled by HOMEBREW_DISABLE_LOAD_FORMULA!"
+ end
+
mod = Module.new
const_set(namespace, mod)
mod.module_eval(contents, path)