From 1100818100ae07fa49419b4ab69ebbeb59a7615d Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 24 Sep 2012 11:40:43 -0400 Subject: [PATCH] Fix fixopt and fixopt error handling The Keg constructor was throwing because we were returning a relative path, and the error-handler was just returning a string rather than raising a string. Worrying because a lot of opts have not been fixed and I thought this was essential for depending on keg-only formula nowadays. Refs Homebrew/homebrew#15077. --- Library/Homebrew/build.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb index d635a04a4c..c6196827da 100755 --- a/Library/Homebrew/build.rb +++ b/Library/Homebrew/build.rb @@ -149,7 +149,7 @@ end def fixopt f path = if f.linked_keg.directory? and f.linked_keg.symlink? - f.linked_keg.readlink + f.linked_keg.realpath elsif f.prefix.directory? f.prefix elsif (kids = f.rack.children).size == 1 and kids.first.directory? @@ -159,5 +159,5 @@ def fixopt f end Keg.new(path).optlink rescue StandardError - "#{f.opt_prefix} not present or broken\nPlease reinstall #{f}. Sorry :(" + raise "#{f.opt_prefix} not present or broken\nPlease reinstall #{f}. Sorry :(" end