aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-07-02 10:47:54 -0500
committerJack Nagel2014-07-02 10:48:18 -0500
commit07e00061a7b8b4c831f6d94e6ee4fbb9804e7723 (patch)
treed335f3cfc8e83a7d745675b24198965f098a8d4b /Library
parentfbe8dc8fc679beea8dacd0c0bf7b6d7a1b073374 (diff)
downloadbrew-07e00061a7b8b4c831f6d94e6ee4fbb9804e7723.tar.bz2
Pass relative paths into link exceptions
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/keg.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb
index 5ab59a841..e80745a0b 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(Pathname(keg))}"
+ s << "Could not symlink #{src}"
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(Pathname(keg))}
+ Could not symlink #{src}
#{dst.dirname} is not writable.
EOS
end
@@ -362,15 +362,15 @@ class Keg
dst.make_relative_symlink(src)
rescue Errno::EEXIST
if dst.exist?
- raise ConflictError.new(self, src, dst)
+ raise ConflictError.new(self, src.relative_path_from(path), dst)
elsif dst.symlink?
dst.unlink
retry
end
rescue Errno::EACCES
- raise DirectoryNotWritableError.new(self, src, dst)
+ raise DirectoryNotWritableError.new(self, src.relative_path_from(path), dst)
rescue SystemCallError
- raise LinkError.new(self, src, dst)
+ raise LinkError.new(self, src.relative_path_from(path), dst)
end
protected