Fix formula paths for manually specified names.

When the name of a new formula can't be autodetected, it defaults to the empty
string. When it then gets read from user input later on, the new name is used
but the formula path, based on the name, stays empty.

This change sets the path after a new name was read.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Martin Kühl 2011-03-27 22:14:16 +02:00 committed by Adam Vandenberg
parent 8e0c96c45d
commit dafe97b047

View File

@ -24,6 +24,7 @@ module Homebrew extend self
path = Pathname.new url path = Pathname.new url
print "Formula name [#{path.stem}]: " print "Formula name [#{path.stem}]: "
fc.name = __gets || path.stem fc.name = __gets || path.stem
fc.path = Formula.path fc.name
end end
unless ARGV.force? unless ARGV.force?
@ -58,7 +59,7 @@ class FormulaCreator
attr :url attr :url
attr :md5 attr :md5
attr :name, true attr :name, true
attr :path attr :path, true
attr :mode, true attr :mode, true
def url= url def url= url