diff options
| author | Jack Nagel | 2014-03-18 19:03:24 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-18 19:03:24 -0500 |
| commit | 8393f40bdb466026fcb95671afae3ff652e86789 (patch) | |
| tree | 51e3751c4956edd158c3f413b12abb638ed06fb8 /Library/Homebrew | |
| parent | e9cad24a464ad475e75d2ca32950f07a481c0c48 (diff) | |
| download | homebrew-8393f40bdb466026fcb95671afae3ff652e86789.tar.bz2 | |
Detect absolute symlinks during bottle relocation check
Diffstat (limited to 'Library/Homebrew')
| -rw-r--r-- | Library/Homebrew/cmd/bottle.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/bottle.rb b/Library/Homebrew/cmd/bottle.rb index 659f8e75a..5f7df309e 100644 --- a/Library/Homebrew/cmd/bottle.rb +++ b/Library/Homebrew/cmd/bottle.rb @@ -83,6 +83,19 @@ module Homebrew extend self result = true end + index = 0 + Pathname.new(keg).find do |pn| + if pn.symlink? && (link = pn.readlink).absolute? + if link.to_s.start_with?(string) + opoo "Absolute symlink starting with #{string}:" if index.zero? + puts " #{pn} -> #{pn.resolved_path}" + end + + index += 1 + result = true + end + end + result end |
