Fix misspelled method name: Formula.canonical_name
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
parent
98f51446cb
commit
4e65175564
@ -33,7 +33,7 @@ module Homebrew extend self
|
|||||||
end
|
end
|
||||||
|
|
||||||
if Formula.aliases.include? fc.name
|
if Formula.aliases.include? fc.name
|
||||||
realname = Formula.caniconical_name fc.name
|
realname = Formula.canonical_name fc.name
|
||||||
raise <<-EOS.undent
|
raise <<-EOS.undent
|
||||||
The formula #{realname} is already aliased to #{fc.name}
|
The formula #{realname} is already aliased to #{fc.name}
|
||||||
Please check that you are not creating a duplicate.
|
Please check that you are not creating a duplicate.
|
||||||
|
|||||||
@ -13,7 +13,7 @@ module Homebrew extend self
|
|||||||
else
|
else
|
||||||
# Don't use ARGV.formulae as that will throw if the file doesn't parse
|
# Don't use ARGV.formulae as that will throw if the file doesn't parse
|
||||||
paths = ARGV.named.map do |name|
|
paths = ARGV.named.map do |name|
|
||||||
HOMEBREW_REPOSITORY+"Library/Formula/#{Formula.caniconical_name name}.rb"
|
HOMEBREW_REPOSITORY+"Library/Formula/#{Formula.canonical_name name}.rb"
|
||||||
end
|
end
|
||||||
unless ARGV.force?
|
unless ARGV.force?
|
||||||
paths.each do |path|
|
paths.each do |path|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ module HomebrewArgvExtension
|
|||||||
require 'keg'
|
require 'keg'
|
||||||
require 'formula'
|
require 'formula'
|
||||||
@kegs ||= downcased_unique_named.collect do |name|
|
@kegs ||= downcased_unique_named.collect do |name|
|
||||||
d = HOMEBREW_CELLAR+Formula.caniconical_name(name)
|
d = HOMEBREW_CELLAR+Formula.canonical_name(name)
|
||||||
dirs = d.children.select{ |pn| pn.directory? } rescue []
|
dirs = d.children.select{ |pn| pn.directory? } rescue []
|
||||||
raise NoSuchKegError.new(name) if not d.directory? or dirs.length == 0
|
raise NoSuchKegError.new(name) if not d.directory? or dirs.length == 0
|
||||||
raise MultipleVersionsInstalledError.new(name) if dirs.length > 1
|
raise MultipleVersionsInstalledError.new(name) if dirs.length > 1
|
||||||
|
|||||||
@ -348,7 +348,7 @@ class Formula
|
|||||||
Dir["#{HOMEBREW_REPOSITORY}/Library/Aliases/*"].map{ |f| File.basename f }.sort
|
Dir["#{HOMEBREW_REPOSITORY}/Library/Aliases/*"].map{ |f| File.basename f }.sort
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.caniconical_name name
|
def self.canonical_name name
|
||||||
formula_with_that_name = HOMEBREW_REPOSITORY+"Library/Formula/#{name}.rb"
|
formula_with_that_name = HOMEBREW_REPOSITORY+"Library/Formula/#{name}.rb"
|
||||||
possible_alias = HOMEBREW_REPOSITORY+"Library/Aliases"+name
|
possible_alias = HOMEBREW_REPOSITORY+"Library/Aliases"+name
|
||||||
if name.include? "/"
|
if name.include? "/"
|
||||||
@ -390,7 +390,7 @@ class Formula
|
|||||||
install_type = :from_path
|
install_type = :from_path
|
||||||
target_file = path.to_s
|
target_file = path.to_s
|
||||||
else
|
else
|
||||||
name = Formula.caniconical_name(name)
|
name = Formula.canonical_name(name)
|
||||||
# For names, map to the path and then require
|
# For names, map to the path and then require
|
||||||
require Formula.path(name)
|
require Formula.path(name)
|
||||||
install_type = :from_name
|
install_type = :from_name
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user