aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-03-19 15:56:51 -0500
committerJack Nagel2014-03-19 15:57:39 -0500
commit676f901738262ea6e77e1b5b3f6f239b882342f4 (patch)
tree11d4b383056d8adf3e4b8c67cd1114f81df71eff /Library
parentbbecc365fbf10e2952a801c470df3cd9197d8743 (diff)
downloadhomebrew-676f901738262ea6e77e1b5b3f6f239b882342f4.tar.bz2
Expand paths before making relative symlink
Fixes #27702. Fixes #27704.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/extend/pathname.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index e94748431..92b51f225 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -80,9 +80,10 @@ class Pathname
end
def install_symlink_p src, new_basename=src
+ src = Pathname(src).expand_path(self)
dst = join File.basename(new_basename)
mkpath
- FileUtils.ln_s Pathname(src).relative_path_from(dst.parent), dst
+ FileUtils.ln_s src.relative_path_from(dst.parent), dst
end
protected :install_symlink_p