From c5fcdb1f21ce792d20ea921bf6f91a71e0b4cf1b Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Fri, 27 Jun 2014 14:44:17 -0500 Subject: [PATCH] Convert to pathname before calling relative_path_from Fixes Homebrew/homebrew#30494. --- Library/Homebrew/keg.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index f7f1a869be..bc96f5356c 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -37,7 +37,7 @@ class Keg def to_s s = [] - s << "Could not symlink #{src.relative_path_from(keg)}" + s << "Could not symlink #{src.relative_path_from(Pathname(keg))}" s << "Target #{dst}" << suggestion s << <<-EOS.undent To force the link and overwrite all conflicting files: @@ -52,7 +52,7 @@ class Keg class DirectoryNotWritableError < LinkError def to_s; <<-EOS.undent - Could not symlink #{src.relative_path_from(keg)} + Could not symlink #{src.relative_path_from(Pathname(keg))} #{dst.dirname} is not writable. EOS end