Class: Homebrew::Cmd::Postinstall

Inherits:
AbstractCommand show all
Defined in:
cmd/postinstall.rb

Instance Attribute Summary

Attributes inherited from AbstractCommand

#args

Instance Method Summary collapse

Methods inherited from AbstractCommand

command, command_name, #initialize, parser

Constructor Details

This class inherits a constructor from Homebrew::AbstractCommand

Instance Method Details

#runvoid

This method returns an undefined value.



20
21
22
23
24
25
26
27
28
29
30
31
# File 'cmd/postinstall.rb', line 20

def run
  args.named.to_resolved_formulae.each do |f|
    ohai "Postinstalling #{f}"
    f.install_etc_var
    if f.post_install_defined?
      fi = FormulaInstaller.new(f, **{ debug: args.debug?, quiet: args.quiet?, verbose: args.verbose? }.compact)
      fi.post_install
    else
      opoo "#{f}: no `post_install` method was defined in the formula!"
    end
  end
end