FIX installed but not installed state.

Pressing CTRL-C during installs would remove the prefix but not the keg directory. brew list would then report this keg as installed, even though it was empty.
This commit is contained in:
Max Howell 2009-09-05 20:45:21 +01:00
parent 7709c3699a
commit 64e767155a

View File

@ -135,7 +135,10 @@ begin
clean f clean f
raise "Nothing was installed to #{f.prefix}" unless f.installed? raise "Nothing was installed to #{f.prefix}" unless f.installed?
rescue Exception rescue Exception
f.prefix.rmtree if f.prefix.directory? if f.prefix.directory?
f.prefix.rmtree
f.prefix.parent.rmdir_if_possible
end
raise raise
end end