Fix "possible reference to past scope" warnings on 2.2
This commit is contained in:
parent
c50fdbd139
commit
dd90030213
@ -202,8 +202,8 @@ class FormulaInstaller
|
|||||||
return if ARGV.force?
|
return if ARGV.force?
|
||||||
|
|
||||||
conflicts = formula.conflicts.select do |c|
|
conflicts = formula.conflicts.select do |c|
|
||||||
formula = Formulary.factory(c.name)
|
f = Formulary.factory(c.name)
|
||||||
formula.linked_keg.exist? && formula.opt_prefix.exist?
|
f.linked_keg.exist? && f.opt_prefix.exist?
|
||||||
end
|
end
|
||||||
|
|
||||||
raise FormulaConflictError.new(formula, conflicts) unless conflicts.empty?
|
raise FormulaConflictError.new(formula, conflicts) unless conflicts.empty?
|
||||||
|
|||||||
@ -259,8 +259,8 @@ class Keg
|
|||||||
link_dir('sbin', mode) {:skip_dir}
|
link_dir('sbin', mode) {:skip_dir}
|
||||||
link_dir('include', mode) {:link}
|
link_dir('include', mode) {:link}
|
||||||
|
|
||||||
link_dir('share', mode) do |path|
|
link_dir('share', mode) do |relative_path|
|
||||||
case path.to_s
|
case relative_path.to_s
|
||||||
when 'locale/locale.alias' then :skip_file
|
when 'locale/locale.alias' then :skip_file
|
||||||
when INFOFILE_RX then :info
|
when INFOFILE_RX then :info
|
||||||
when LOCALEDIR_RX then :mkpath
|
when LOCALEDIR_RX then :mkpath
|
||||||
@ -273,8 +273,8 @@ class Keg
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
link_dir('lib', mode) do |path|
|
link_dir('lib', mode) do |relative_path|
|
||||||
case path.to_s
|
case relative_path.to_s
|
||||||
when 'charset.alias' then :skip_file
|
when 'charset.alias' then :skip_file
|
||||||
# pkg-config database gets explicitly created
|
# pkg-config database gets explicitly created
|
||||||
when 'pkgconfig' then :mkpath
|
when 'pkgconfig' then :mkpath
|
||||||
@ -294,12 +294,12 @@ class Keg
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
link_dir('Frameworks', mode) do |path|
|
link_dir('Frameworks', mode) do |relative_path|
|
||||||
# Frameworks contain symlinks pointing into a subdir, so we have to use
|
# Frameworks contain symlinks pointing into a subdir, so we have to use
|
||||||
# the :link strategy. However, for Foo.framework and
|
# the :link strategy. However, for Foo.framework and
|
||||||
# Foo.framework/Versions we have to use :mkpath so that multiple formulae
|
# Foo.framework/Versions we have to use :mkpath so that multiple formulae
|
||||||
# can link their versions into it and `brew [un]link` works.
|
# can link their versions into it and `brew [un]link` works.
|
||||||
if path.to_s =~ /[^\/]*\.framework(\/Versions)?$/
|
if relative_path.to_s =~ /[^\/]*\.framework(\/Versions)?$/
|
||||||
:mkpath
|
:mkpath
|
||||||
else
|
else
|
||||||
:link
|
:link
|
||||||
|
|||||||
@ -45,7 +45,7 @@ class Tab < OpenStruct
|
|||||||
|
|
||||||
def self.remap_deprecated_options deprecated_options, options
|
def self.remap_deprecated_options deprecated_options, options
|
||||||
deprecated_options.each do |deprecated_option|
|
deprecated_options.each do |deprecated_option|
|
||||||
option = options.find {|option| option.name == deprecated_option.old }
|
option = options.find { |o| o.name == deprecated_option.old }
|
||||||
next unless option
|
next unless option
|
||||||
options -= [option]
|
options -= [option]
|
||||||
options << Option.new(deprecated_option.current, option.description)
|
options << Option.new(deprecated_option.current, option.description)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user