From d7be7d038ab4ffb3af4e8f32334b313f6878049c Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Wed, 19 Aug 2020 07:33:07 +0200 Subject: [PATCH] Document `SystemCommand`. --- Library/Homebrew/system_command.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Homebrew/system_command.rb b/Library/Homebrew/system_command.rb index b507ec1434..05c4cb86c2 100644 --- a/Library/Homebrew/system_command.rb +++ b/Library/Homebrew/system_command.rb @@ -9,6 +9,9 @@ require "extend/io" require "extend/hash_validator" using HashValidator +# Make `system_command` available everywhere. +# +# @api private module Kernel def system_command(*args) SystemCommand.run(*args) @@ -19,6 +22,9 @@ module Kernel end end +# Class for running sub-processes and capturing their output and exit status. +# +# @api private class SystemCommand include Context extend Predicable @@ -167,6 +173,7 @@ class SystemCommand sources.each(&:close_read) end + # Result containing the output and exit status of a finished sub-process. class Result include Context