Improve compatibility for old formula
Allow compatibility to be disabled with --no-compat or HOMEBREW_NO_COMPAT environment variable.
This commit is contained in:
parent
6726fe090f
commit
b36dcc4ffd
3
Library/Homebrew/compat/brewkit.rb
Normal file
3
Library/Homebrew/compat/brewkit.rb
Normal file
@ -0,0 +1,3 @@
|
||||
# here so that formula from the repo that are very old can still be installed
|
||||
|
||||
require 'formula'
|
||||
@ -76,5 +76,7 @@ class Formula
|
||||
def fails_with_llvm msg=nil, data=nil
|
||||
handle_llvm_failure FailsWithLLVM.new(msg, data)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
class UnidentifiedFormula < Formula
|
||||
end
|
||||
@ -3,7 +3,6 @@ require 'extend/ARGV'
|
||||
require 'extend/string'
|
||||
require 'utils'
|
||||
require 'exceptions'
|
||||
require 'compatibility'
|
||||
|
||||
ARGV.extend(HomebrewArgvExtension)
|
||||
|
||||
@ -58,3 +57,8 @@ end
|
||||
|
||||
FORMULA_META_FILES = %w[README README.md ChangeLog COPYING LICENSE LICENCE COPYRIGHT AUTHORS]
|
||||
PLEASE_REPORT_BUG = "#{Tty.white}Please report this bug: #{Tty.em}https://github.com/mxcl/homebrew/wiki/Checklist-before-filing-a-new-issue#{Tty.reset}"
|
||||
|
||||
unless ARGV.include? "--no-compat" or ENV['HOMEBREW_NO_COMPAT']
|
||||
$:.unshift(File.expand_path("#{__FILE__}/../compat"))
|
||||
require 'compatibility'
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user