Move the fixopt method into the Build class

This commit is contained in:
Jack Nagel 2014-07-28 21:22:33 -05:00
parent 8df8f437f0
commit 8a971f7268

View File

@ -208,9 +208,8 @@ class Build
end end
end end
end end
end
def fixopt f def fixopt f
path = if f.linked_keg.directory? and f.linked_keg.symlink? path = if f.linked_keg.directory? and f.linked_keg.symlink?
f.linked_keg.resolved_path f.linked_keg.resolved_path
elsif f.prefix.directory? elsif f.prefix.directory?
@ -221,6 +220,7 @@ def fixopt f
raise raise
end end
Keg.new(path).optlink Keg.new(path).optlink
rescue StandardError rescue StandardError
raise "#{f.opt_prefix} not present or broken\nPlease reinstall #{f}. Sorry :(" raise "#{f.opt_prefix} not present or broken\nPlease reinstall #{f}. Sorry :("
end
end end