aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2014-03-18 19:03:24 -0500
committerJack Nagel2014-03-18 19:03:24 -0500
commit8393f40bdb466026fcb95671afae3ff652e86789 (patch)
tree51e3751c4956edd158c3f413b12abb638ed06fb8 /Library/Homebrew/cmd
parente9cad24a464ad475e75d2ca32950f07a481c0c48 (diff)
downloadhomebrew-8393f40bdb466026fcb95671afae3ff652e86789.tar.bz2
Detect absolute symlinks during bottle relocation check
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/bottle.rb13
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