aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-09-24 11:40:43 -0400
committerMax Howell2012-09-24 11:41:21 -0400
commit023f2bd85be4762885a72d9ab4735cba1e090deb (patch)
tree7c1d429a5fd05eada7723d3751b43e37e6d02a36 /Library
parent72c2a379d64284b316ba9fe58715305d51b28df8 (diff)
downloadhomebrew-023f2bd85be4762885a72d9ab4735cba1e090deb.tar.bz2
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 #15077.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Homebrew/build.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index d635a04a4..c6196827d 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