diff options
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 27 | 
1 files changed, 18 insertions, 9 deletions
| diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 3f85b2c17..2a5120342 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -261,17 +261,13 @@ class FormulaInstaller        opoo "#{formula.full_name}: this formula has no #{option} option so it will be ignored!"      end -    options = [] -    if formula.head? -      options << "--HEAD" -    elsif formula.devel? -      options << "--devel" +    options = display_options(formula) +    if show_header? +      oh1 "Installing #{Formatter.identifier(formula.full_name)} #{options}".strip      end -    options += effective_build_options_for(formula).used_options.to_a -    oh1 "Installing #{Formatter.identifier(formula.full_name)} #{options.join " "}" if show_header?      if formula.tap && !formula.tap.private? -      action = ([formula.full_name] + options).join(" ") +      action = "#{formula.full_name} #{options}".strip        Utils::Analytics.report_event("install", action)        if installed_on_request @@ -475,6 +471,18 @@ class FormulaInstaller      BuildOptions.new(args, dependent.options)    end +  def display_options(formula) +    options = [] +    if formula.head? +      options << "--HEAD" +    elsif formula.devel? +      options << "--devel" +    end +    options += effective_build_options_for(formula).used_options.to_a +    return if options.empty? +    options.join(" ") +  end +    def inherited_options_for(dep)      inherited_options = Options.new      u = Option.new("universal") @@ -677,7 +685,8 @@ class FormulaInstaller      if !formula.prefix.directory? || Keg.new(formula.prefix).empty_installation?        raise "Empty installation"      end -  rescue Exception +  rescue Exception => e +    e.options = display_options(formula) if e.is_a?(BuildError)      ignore_interrupts do        # any exceptions must leave us with nothing installed        formula.update_head_version | 
