Homebrew/homebrew — pull request #26530 by earlchew (2014-02-08 18:02:10+00:00)
Title: [global] Use realpath if HOMEBREW_PREFIX is a symlink

https://github.com/Homebrew/homebrew/issues/26524

HOMEBREW_PREFIX is set to the parent of the dirname of HOMEBREW_BREW_FILE.
If HOMEBREW_PREFIX is a symlink, Keg.link_dir to compute the wrong
relative paths when installing targets. This change checks if is a
symlink and if so sets it to its realpath instead.