From 3451c2d67f723d81b10b4d477b2a5d8e4f4db728 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Wed, 30 Jul 2014 16:29:10 -0500 Subject: [PATCH] Handle nonexistent files when constructing ConflictError Closes Homebrew/homebrew#31051. --- Library/Homebrew/keg.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index a6d9bafd10..576811fb88 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -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