Expand paths before making relative symlink
Fixes Homebrew/homebrew#27702. Fixes Homebrew/homebrew#27704.
This commit is contained in:
parent
c613ff0fad
commit
7f33a84ce6
@ -80,9 +80,10 @@ class Pathname
|
|||||||
end
|
end
|
||||||
|
|
||||||
def install_symlink_p src, new_basename=src
|
def install_symlink_p src, new_basename=src
|
||||||
|
src = Pathname(src).expand_path(self)
|
||||||
dst = join File.basename(new_basename)
|
dst = join File.basename(new_basename)
|
||||||
mkpath
|
mkpath
|
||||||
FileUtils.ln_s Pathname(src).relative_path_from(dst.parent), dst
|
FileUtils.ln_s src.relative_path_from(dst.parent), dst
|
||||||
end
|
end
|
||||||
protected :install_symlink_p
|
protected :install_symlink_p
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user