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
|
class ConflictError < LinkError
|
||||||
def suggestion
|
def suggestion
|
||||||
conflict = Keg.for(dst)
|
conflict = Keg.for(dst)
|
||||||
rescue NotAKegError
|
rescue NotAKegError, Errno::ENOENT
|
||||||
"already exists. You may want to remove it:\n rm #{dst}\n"
|
"already exists. You may want to remove it:\n rm #{dst}\n"
|
||||||
else
|
else
|
||||||
<<-EOS.undent
|
<<-EOS.undent
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user