brew create uses new Aliasing system
This commit is contained in:
parent
1c3f0e43de
commit
0fcb584862
@ -36,12 +36,14 @@ def __make url, name
|
|||||||
|
|
||||||
path = Formula.path name
|
path = Formula.path name
|
||||||
raise "#{path} already exists" if path.exist?
|
raise "#{path} already exists" if path.exist?
|
||||||
|
|
||||||
# Check if a formula aliased to this name exists.
|
if Formula.aliases.include? name and not ARGV.force?
|
||||||
already_aka = Formulary.find_alias name
|
realname = HOMEBREW_REPOSITORY.join("Library/Aliases/#{name}").realpath.basename('.rb')
|
||||||
if already_aka != nil
|
raise <<-EOS.undent
|
||||||
opoo "Formula #{already_aka} is aliased to #{name}."
|
The formula #{realname} is already aliased to #{name}
|
||||||
puts "Please check if you are creating a duplicate."
|
Please check that you are not creating a duplicate.
|
||||||
|
To force creation use --force.
|
||||||
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
version = Pathname.new(url).version
|
version = Pathname.new(url).version
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user