Only ask for the stem once
This commit is contained in:
parent
22038d5269
commit
b08c070481
@ -36,11 +36,11 @@ module Homebrew
|
|||||||
:autotools
|
:autotools
|
||||||
end
|
end
|
||||||
|
|
||||||
if fc.name.nil? or fc.name.to_s.strip.empty?
|
if fc.name.nil? || fc.name.strip.empty?
|
||||||
path = Pathname.new url
|
stem = Pathname.new(url).stem
|
||||||
print "Formula name [#{path.stem}]: "
|
print "Formula name [#{stem}]: "
|
||||||
fc.name = __gets || path.stem
|
fc.name = __gets || stem
|
||||||
fc.path = Formula.path fc.name
|
fc.path = Formula.path(fc.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Don't allow blacklisted formula, or names that shadow aliases,
|
# Don't allow blacklisted formula, or names that shadow aliases,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user