diff options
| author | Jack Nagel | 2014-07-17 19:40:44 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-07-17 19:55:58 -0500 |
| commit | b08c070481756919091dfe12a4a1876cf8c87644 (patch) | |
| tree | 0a54cc89eb953419bc047cacd8020bfa37d491a1 /Library | |
| parent | 22038d5269d591ecc6646eba8b474d6320f7c476 (diff) | |
| download | brew-b08c070481756919091dfe12a4a1876cf8c87644.tar.bz2 | |
Only ask for the stem once
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/create.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/cmd/create.rb b/Library/Homebrew/cmd/create.rb index 2ea098e0c..dcef372d8 100644 --- a/Library/Homebrew/cmd/create.rb +++ b/Library/Homebrew/cmd/create.rb @@ -36,11 +36,11 @@ module Homebrew :autotools end - if fc.name.nil? or fc.name.to_s.strip.empty? - path = Pathname.new url - print "Formula name [#{path.stem}]: " - fc.name = __gets || path.stem - fc.path = Formula.path fc.name + if fc.name.nil? || fc.name.strip.empty? + stem = Pathname.new(url).stem + print "Formula name [#{stem}]: " + fc.name = __gets || stem + fc.path = Formula.path(fc.name) end # Don't allow blacklisted formula, or names that shadow aliases, |
