Convert to pathname before calling relative_path_from

Fixes Homebrew/homebrew#30494.
This commit is contained in:
Jack Nagel 2014-06-27 14:44:17 -05:00
parent 70f22fc31e
commit c5fcdb1f21

View File

@ -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