Make FormulaInstaller setup more readable
This commit is contained in:
parent
ce5e2aa65c
commit
3b68723fa8
@ -56,13 +56,13 @@ module Homebrew extend self
|
|||||||
def upgrade_formula f
|
def upgrade_formula f
|
||||||
outdated_keg = Keg.new(f.linked_keg.realpath) rescue nil
|
outdated_keg = Keg.new(f.linked_keg.realpath) rescue nil
|
||||||
|
|
||||||
installer = FormulaInstaller.new(f)
|
fi = FormulaInstaller.new(f)
|
||||||
installer.options |= Tab.for_formula(f).used_options
|
fi.options = Tab.for_formula(f).used_options
|
||||||
installer.build_from_source = ARGV.build_from_source?
|
fi.build_from_source = ARGV.build_from_source?
|
||||||
installer.verbose = ARGV.verbose?
|
fi.verbose = ARGV.verbose?
|
||||||
installer.verbose &&= :quieter if ARGV.quieter?
|
fi.verbose &&= :quieter if ARGV.quieter?
|
||||||
installer.debug = ARGV.debug?
|
fi.debug = ARGV.debug?
|
||||||
installer.prelude
|
fi.prelude
|
||||||
|
|
||||||
oh1 "Upgrading #{f.name}"
|
oh1 "Upgrading #{f.name}"
|
||||||
|
|
||||||
@ -71,9 +71,9 @@ module Homebrew extend self
|
|||||||
# do! Seriously, it happens!
|
# do! Seriously, it happens!
|
||||||
outdated_keg.unlink if outdated_keg
|
outdated_keg.unlink if outdated_keg
|
||||||
|
|
||||||
installer.install
|
fi.install
|
||||||
installer.caveats
|
fi.caveats
|
||||||
installer.finish
|
fi.finish
|
||||||
|
|
||||||
# If the formula was pinned, and we were force-upgrading it, unpin and
|
# If the formula was pinned, and we were force-upgrading it, unpin and
|
||||||
# pin it again to get a symlink pointing to the correct keg.
|
# pin it again to get a symlink pointing to the correct keg.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user