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.
This commit is contained in:
parent
bda8bb08e3
commit
1100818100
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user