Skip to content

Commit

Permalink
Merge pull request #17879 from Homebrew/kernel_require_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Jul 26, 2024
2 parents 0b2a74d + 42438f4 commit 04621ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Library/Homebrew/extend/kernel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ def with_custom_locale(locale, &block)

# Kernel.system but with exceptions.
def safe_system(cmd, *args, **options)
require "utils"

return if Homebrew.system(cmd, *args, **options)

raise ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS)
Expand All @@ -273,6 +275,8 @@ def safe_system(cmd, *args, **options)
#
# @api internal
def quiet_system(cmd, *args)
require "utils"

Homebrew._system(cmd, *args) do
# Redirect output streams to `/dev/null` instead of closing as some programs
# will fail to execute if they can't write to an open stream.
Expand Down

0 comments on commit 04621ba

Please sign in to comment.