Handle nonexistent files when constructing ConflictError
Closes Homebrew/homebrew#31051.
This commit is contained in:
parent
ba4a4e4103
commit
3451c2d67f
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user