aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2015-03-24 21:05:34 -0400
committerJack Nagel2015-03-24 21:06:19 -0400
commitab3d622da231b862a363e56cfcce63e5d2ea1f4c (patch)
treea493f4c74ca2a44fd3649c41494355a73dc72af3 /Library/Homebrew
parent6f0efd6f3dcb810f5f14770effd52ea07e1fdffe (diff)
downloadbrew-ab3d622da231b862a363e56cfcce63e5d2ea1f4c.tar.bz2
Always pass basename to install_symlink_p
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/extend/pathname.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb
index 17b11eb87..86c4f8a24 100644
--- a/Library/Homebrew/extend/pathname.rb
+++ b/Library/Homebrew/extend/pathname.rb
@@ -64,20 +64,20 @@ class Pathname
sources.each do |src|
case src
when Array
- src.each {|s| install_symlink_p(s) }
+ src.each { |s| install_symlink_p(s, File.basename(s)) }
when Hash
- src.each {|s, new_basename| install_symlink_p(s, new_basename) }
+ src.each { |s, new_basename| install_symlink_p(s, new_basename) }
else
- install_symlink_p(src)
+ install_symlink_p(src, File.basename(src))
end
end
end
- def install_symlink_p src, new_basename=src
+ def install_symlink_p(src, new_basename)
src = Pathname(src).expand_path(self)
- dst = join File.basename(new_basename)
+ dst = join(new_basename)
mkpath
- FileUtils.ln_sf src.relative_path_from(dst.parent), dst
+ FileUtils.ln_sf(src.relative_path_from(dst.parent), dst)
end
protected :install_symlink_p