Merge pull request #17132 from reitermarkus/docs-api-public

Explicitly mark non-public APIs.
This commit is contained in:
Mike McQuaid 2024-04-23 21:29:37 +01:00 committed by GitHub
commit 9682681a78
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 2 deletions

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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