From 034337ec5e09f128ecea9f89ff06bbb5b26195ad Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Thu, 12 Nov 2009 11:09:20 -0800 Subject: Compare against HOMEBREW_CELLAR using real paths. The code in Keg.self.for path uses "path = path.parent.realpath" to walk up subfolders looking for a Keg. Because 'realpath' is in there, and the path is checked against HOMEBREW_CELLAR, which may be a symlink, we need to do realpath-to-realpath comparisons in Keg. Otherwise, we will hit equivalent but symlinked folders, not see that they are the same, and walk all the way up to / and then error out. --- Library/Homebrew/keg.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index b9ca83953..8fdc78b4e 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -24,14 +24,15 @@ class Keg