Handle nonexistent files when constructing ConflictError

Closes Homebrew/homebrew#31051.
This commit is contained in:
Jack Nagel 2014-07-30 16:29:10 -05:00
parent ba4a4e4103
commit 3451c2d67f

View File

@ -26,7 +26,7 @@ class Keg
class ConflictError < LinkError
def suggestion
conflict = Keg.for(dst)
rescue NotAKegError
rescue NotAKegError, Errno::ENOENT
"already exists. You may want to remove it:\n rm #{dst}\n"
else
<<-EOS.undent