Class: Homebrew::Cmd::Services::ListSubcommand Private
- Inherits:
-
AbstractSubcommand
- Object
- AbstractSubcommand
- Homebrew::Cmd::Services::ListSubcommand
- Extended by:
- Utils::Output::Mixin
- Defined in:
- services/subcommand/list.rb
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Constant Summary collapse
- TRIGGERS =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
T.let([nil, "list", "ls"].freeze, T::Array[T.nilable(String)])
- JSON_FIELDS =
This constant is part of a private API. This constant may only be used in the Homebrew/brew repository. Third parties should avoid using this constant if possible, as it may be removed or changed without warning.
T.let([:name, :status, :user, :file, :exit_code].freeze, T::Array[Symbol])
Instance Attribute Summary
Attributes inherited from AbstractSubcommand
#args, #cleanup, #context, #quiet, #targets
Instance Method Summary collapse
- #run ⇒ void private
Methods included from Utils::Output::Mixin
issue_reporting_message, odebug, odeprecated, odie, odisabled, ofail, oh1, oh1_title, ohai, ohai_title, onoe, opoo, opoo_outside_github_actions, pretty_deprecated, pretty_disabled, pretty_duration, pretty_install_status, pretty_installed, pretty_outdated, pretty_uninstalled, pretty_upgradable
Methods inherited from AbstractSubcommand
define, define_all, #initialize, subcommand_name, subcommands_for
Constructor Details
This class inherits a constructor from Homebrew::AbstractSubcommand
Instance Method Details
#run ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'services/subcommand/list.rb', line 25 def run formulae = Homebrew::Services::Formulae.services_list if formulae.blank? opoo "No services available to control with `#{Homebrew::Services::Cli.bin}`" if $stderr.tty? puts "[]" if args.json? return end if args.json? self.class.print_json(formulae) else self.class.print_table(formulae) end end |