Merge pull request #17132 from reitermarkus/docs-api-public
Explicitly mark non-public APIs.
This commit is contained in:
commit
9682681a78
@ -49,6 +49,9 @@ class UnsupportedInstallationMethod < RuntimeError; end
|
|||||||
|
|
||||||
class MultipleVersionsInstalledError < RuntimeError; end
|
class MultipleVersionsInstalledError < RuntimeError; end
|
||||||
|
|
||||||
|
# Raised when a path is not a keg.
|
||||||
|
#
|
||||||
|
# @api internal
|
||||||
class NotAKegError < RuntimeError; end
|
class NotAKegError < RuntimeError; end
|
||||||
|
|
||||||
# Raised when a keg doesn't exist.
|
# Raised when a keg doesn't exist.
|
||||||
|
@ -255,7 +255,9 @@ module Kernel
|
|||||||
raise ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS)
|
raise ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Prints no output.
|
# Run a system comand without any output.
|
||||||
|
#
|
||||||
|
# @api internal
|
||||||
def quiet_system(cmd, *args)
|
def quiet_system(cmd, *args)
|
||||||
Homebrew._system(cmd, *args) do
|
Homebrew._system(cmd, *args) do
|
||||||
# Redirect output streams to `/dev/null` instead of closing as some programs
|
# Redirect output streams to `/dev/null` instead of closing as some programs
|
||||||
|
@ -12,14 +12,22 @@ require "utils/timer"
|
|||||||
|
|
||||||
# Class for running sub-processes and capturing their output and exit status.
|
# Class for running sub-processes and capturing their output and exit status.
|
||||||
#
|
#
|
||||||
# @api private
|
# @api internal
|
||||||
class SystemCommand
|
class SystemCommand
|
||||||
# Helper functions for calling {SystemCommand.run}.
|
# Helper functions for calling {SystemCommand.run}.
|
||||||
|
#
|
||||||
|
# @api internal
|
||||||
module Mixin
|
module Mixin
|
||||||
|
# Run a fallible system command.
|
||||||
|
#
|
||||||
|
# @api internal
|
||||||
def system_command(executable, **options)
|
def system_command(executable, **options)
|
||||||
SystemCommand.run(executable, **options)
|
SystemCommand.run(executable, **options)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Run an infallible system command.
|
||||||
|
#
|
||||||
|
# @api internal
|
||||||
def system_command!(command, **options)
|
def system_command!(command, **options)
|
||||||
SystemCommand.run!(command, **options)
|
SystemCommand.run!(command, **options)
|
||||||
end
|
end
|
||||||
|
@ -14,6 +14,9 @@ module Formatter
|
|||||||
prefix("==>", string, color)
|
prefix("==>", string, color)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Format a string as headline.
|
||||||
|
#
|
||||||
|
# @api internal
|
||||||
def self.headline(string, color: nil)
|
def self.headline(string, color: nil)
|
||||||
arrow("#{Tty.bold}#{string}#{Tty.reset}", color:)
|
arrow("#{Tty.bold}#{string}#{Tty.reset}", color:)
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user