Don't allow Keg.new for empty kegs
Kegs have to exist to be created.
This commit is contained in:
parent
4ac760779e
commit
6d64eb28d5
@ -29,7 +29,9 @@ class Keg
|
||||
elsif formula.is_a? Pathname
|
||||
# TODO
|
||||
elsif formula.is_a? String
|
||||
kids=($cellar+formula).children
|
||||
path=$cellar+formula
|
||||
kids=path.children
|
||||
raise "Empty installation: #{path}" if kids.length < 1
|
||||
raise "Multiple versions installed" if kids.length > 1
|
||||
@path=kids[0]
|
||||
@name=formula
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user