From dafe97b047cece6d12c5fa4302ae5966bbe12939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20K=C3=BChl?= Date: Sun, 27 Mar 2011 22:14:16 +0200 Subject: [PATCH] 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 --- Library/Homebrew/cmd/create.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb index d69ec2aba3..d92dc0b006 100644 --- a/Library/Homebrew/cmd/create.rb +++ b/Library/Homebrew/cmd/create.rb @@ -24,6 +24,7 @@ module Homebrew extend self path = Pathname.new url print "Formula name [#{path.stem}]: " fc.name = __gets || path.stem + fc.path = Formula.path fc.name end unless ARGV.force? @@ -58,7 +59,7 @@ class FormulaCreator attr :url attr :md5 attr :name, true - attr :path + attr :path, true attr :mode, true def url= url