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
commit7f33a84ce6e006ef50fd308ee0e2a145a8b481d5 (patch)
treed7b6957c93dfe4468ce2f7e0ed6f3d8be38610c6 /Library
parentc613ff0fadd54e1e9451294087882a1d338f875e (diff)
downloadbrew-7f33a84ce6e006ef50fd308ee0e2a145a8b481d5.tar.bz2
Expand paths before making relative symlink
Fixes Homebrew/homebrew#27702. Fixes Homebrew/homebrew#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