From 8393f40bdb466026fcb95671afae3ff652e86789 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 18 Mar 2014 19:03:24 -0500 Subject: Detect absolute symlinks during bottle relocation check --- Library/Homebrew/cmd/bottle.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Library') 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 -- cgit v1.2.3