Skip to content

Commit

Permalink
Fix formula paths for manually specified names.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
mkhl authored and adamv committed Apr 9, 2011
1 parent 45bff20 commit 413cd1e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Library/Homebrew/cmd/create.rb
Expand Up @@ -24,6 +24,7 @@ def create
path = Pathname.new url
print "Formula name [#{path.stem}]: "
fc.name = __gets || path.stem
fc.path = Formula.path fc.name
end

unless ARGV.force?
Expand Down Expand Up @@ -58,7 +59,7 @@ class FormulaCreator
attr :url
attr :md5
attr :name, true
attr :path
attr :path, true
attr :mode, true

def url= url
Expand Down

0 comments on commit 413cd1e

Please sign in to comment.