aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-03-18 19:03:24 -0500
committerJack Nagel2014-03-18 19:03:24 -0500
commit4353f4fc97b53f606c0dd3b37a9c678f7db561ee (patch)
tree21d1e4fd16c321a9e5583880d47fac770675d498 /Library
parente0c1f5aef69470ed70ba4ec352e187b7ecc9b46d (diff)
downloadbrew-4353f4fc97b53f606c0dd3b37a9c678f7db561ee.tar.bz2
Detect absolute symlinks during bottle relocation check
Diffstat (limited to 'Library')
-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