Spec-Zone.ru › Homebrew

Module: SystemCommand::Mixin

Included in:
AbstractDownloadStrategy, Cask::Artifact::AbstractUninstall, Cask::Audit, Cask::Quarantine, Cask::Utils::Trash, GitHub, GitHub::API, GitHubPackages, Homebrew::Attestation, Homebrew::Bump, Homebrew::BundleVersion, Homebrew::Cmd::List, Homebrew::DevCmd::BumpUnversionedCasks, Homebrew::DevCmd::GenerateManCompletions, Homebrew::DevCmd::GenerateZap, Homebrew::DevCmd::Lgtm, Homebrew::DevCmd::TapNew, Homebrew::DevCmd::Tests, Homebrew::DevCmd::UpdateLicenseData, Homebrew::DevCmd::UpdateMaintainers, Homebrew::DevCmd::UpdateSponsors, Homebrew::Diagnostic::Checks, Homebrew::Livecheck::Strategy::Git, Homebrew::Style, Homebrew::TestBot::Step, Homebrew::UnversionedCaskChecker, OS::Linux::SystemConfig::ClassMethods, OS::Mac::Keg, Pathname, Readall, SystemConfig, UnpackStrategy, UnpackStrategy::Dmg, UnpackStrategy::Dmg::Bom, UnpackStrategy::Fossil, UnpackStrategy::Tar, User, Utils::Curl, Utils::Curl, Utils::Git, Utils::Svn, Utils::Tar
Defined in:
system_command.rb

Overview

This module is part of an internal API. This module may only be used internally in repositories owned by Homebrew, except in casks or formulae. Third parties should avoid using this module if possible, as it may be removed or changed without warning.

Helper functions for calling run.

Instance Method Summary collapse

  • #system_command(executable, args: [], sudo: false, sudo_as_root: false, env: {}, input: [], must_succeed: false, print_stdout: false, print_stderr: true, debug: nil, verbose: nil, secrets: [], chdir: T.unsafe(nil), reset_uid: false, run_as_real_uid: false, timeout: nil) ⇒ SystemCommand::Result internal

    Run a fallible system command.

  • #system_command!(executable, args: [], sudo: false, sudo_as_root: false, env: {}, input: [], print_stdout: false, print_stderr: true, debug: nil, verbose: nil, secrets: [], chdir: T.unsafe(nil), reset_uid: false, run_as_real_uid: false, timeout: nil) ⇒ SystemCommand::Result internal

    Run an infallible system command.

Instance Method Details

#system_command(executable, args: [], sudo: false, sudo_as_root: false, env: {}, input: [], must_succeed: false, print_stdout: false, print_stderr: true, debug: nil, verbose: nil, secrets: [], chdir: T.unsafe(nil), reset_uid: false, run_as_real_uid: false, timeout: nil) ⇒ SystemCommand::Result

This method is part of an internal API. This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Run a fallible system command.

Parameters:

  • executable (String, Pathname)
  • args (Array<String, Integer, Float, Pathname>) (defaults to: [])
  • sudo (Boolean) (defaults to: false)
  • sudo_as_root (Boolean) (defaults to: false)
  • env (Hash{String => String, Boolean, PATH, nil}) (defaults to: {})
  • input (String, Array<String>) (defaults to: [])
  • must_succeed (Boolean) (defaults to: false)
  • print_stdout (Boolean, Symbol) (defaults to: false)
  • print_stderr (Boolean, Symbol) (defaults to: true)
  • debug (Boolean, nil) (defaults to: nil)
  • verbose (Boolean, nil) (defaults to: nil)
  • secrets (String, Array<String>) (defaults to: [])
  • chdir (String, Pathname) (defaults to: T.unsafe(nil))
  • reset_uid (Boolean) (defaults to: false)
  • run_as_real_uid (Boolean) (defaults to: false)
  • timeout (Integer, Float, nil) (defaults to: nil)

Returns:

  • (SystemCommand::Result)


43
44
45
46
47
48
# File 'system_command.rb', line 43

def system_command(executable, args: [], sudo: false, sudo_as_root: false, env: {}, input: [],
                   must_succeed: false, print_stdout: false, print_stderr: true, debug: nil, verbose: nil,
                   secrets: [], chdir: T.unsafe(nil), reset_uid: false, run_as_real_uid: false, timeout: nil)
  SystemCommand.run(executable, args:, sudo:, sudo_as_root:, env:, input:, must_succeed:, print_stdout:,
                    print_stderr:, debug:, verbose:, secrets:, chdir:, reset_uid:, run_as_real_uid:, timeout:)
end

#system_command!(executable, args: [], sudo: false, sudo_as_root: false, env: {}, input: [], print_stdout: false, print_stderr: true, debug: nil, verbose: nil, secrets: [], chdir: T.unsafe(nil), reset_uid: false, run_as_real_uid: false, timeout: nil) ⇒ SystemCommand::Result

This method is part of an internal API. This method may only be used internally in repositories owned by Homebrew, except in casks or formulae. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Run an infallible system command.

Parameters:

  • executable (String, Pathname)
  • args (Array<String, Integer, Float, Pathname>) (defaults to: [])
  • sudo (Boolean) (defaults to: false)
  • sudo_as_root (Boolean) (defaults to: false)
  • env (Hash{String => String, Boolean, PATH, nil}) (defaults to: {})
  • input (String, Array<String>) (defaults to: [])
  • print_stdout (Boolean, Symbol) (defaults to: false)
  • print_stderr (Boolean, Symbol) (defaults to: true)
  • debug (Boolean, nil) (defaults to: nil)
  • verbose (Boolean, nil) (defaults to: nil)
  • secrets (String, Array<String>) (defaults to: [])
  • chdir (String, Pathname) (defaults to: T.unsafe(nil))
  • reset_uid (Boolean) (defaults to: false)
  • run_as_real_uid (Boolean) (defaults to: false)
  • timeout (Integer, Float, nil) (defaults to: nil)

Returns:

  • (SystemCommand::Result)


72
73
74
75
76
77
# File 'system_command.rb', line 72

def system_command!(executable, args: [], sudo: false, sudo_as_root: false, env: {}, input: [],
                    print_stdout: false, print_stderr: true, debug: nil, verbose: nil, secrets: [],
                    chdir: T.unsafe(nil), reset_uid: false, run_as_real_uid: false, timeout: nil)
  SystemCommand.run!(executable, args:, sudo:, sudo_as_root:, env:, input:, print_stdout:,
                     print_stderr:, debug:, verbose:, secrets:, chdir:, reset_uid:, run_as_real_uid:, timeout:)
end

© 2009–present Homebrew contributors
Licensed under the BSD 2-Clause License.
https://docs.brew.sh/rubydoc/SystemCommand/Mixin.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API