diff options
| author | Jack Nagel | 2015-03-24 21:05:34 -0400 | 
|---|---|---|
| committer | Jack Nagel | 2015-03-24 21:06:19 -0400 | 
| commit | 32ddf67105f119eff2e8e192933f1a6bc0617813 (patch) | |
| tree | 9ad1520345a00c831862d18c18bab1e54da9a4fa | |
| parent | c2b8017e68068eca9589aa6020da800f0e668264 (diff) | |
| download | homebrew-32ddf67105f119eff2e8e192933f1a6bc0617813.tar.bz2 | |
Always pass basename to install_symlink_p
| -rw-r--r-- | Library/Homebrew/extend/pathname.rb | 12 | 
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 | 
