Explicitly mark non-public APIs.

This commit is contained in:
Markus Reiter 2024-04-23 19:10:33 +02:00
parent 7a9029e1d5
commit 5e636174e8
No known key found for this signature in database
GPG Key ID: 245293B51702655B
4 changed files with 18 additions and 2 deletions

View File

@ -49,6 +49,9 @@ class UnsupportedInstallationMethod < RuntimeError; end
class MultipleVersionsInstalledError < RuntimeError; end
# Raised when a path is not a keg.
#
# @api internal
class NotAKegError < RuntimeError; end
# Raised when a keg doesn't exist.

View File

@ -255,7 +255,9 @@ module Kernel
raise ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS)
end
# Prints no output.
# Run a system comand without any output.
#
# @api internal
def quiet_system(cmd, *args)
Homebrew._system(cmd, *args) do
# 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.
#
# @api private
# @api internal
class SystemCommand
# Helper functions for calling {SystemCommand.run}.
#
# @api internal
module Mixin
# Run a fallible system command.
#
# @api internal
def system_command(executable, **options)
SystemCommand.run(executable, **options)
end
# Run an infallible system command.
#
# @api internal
def system_command!(command, **options)
SystemCommand.run!(command, **options)
end

View File

@ -14,6 +14,9 @@ module Formatter
prefix("==>", string, color)
end
# Format a string as headline.
#
# @api internal
def self.headline(string, color: nil)
arrow("#{Tty.bold}#{string}#{Tty.reset}", color:)
end