Skip to content

Commit

Permalink
extend/kernel: add missing utils require.
Browse files Browse the repository at this point in the history
Don't require this globally to avoid slowing down boot.
  • Loading branch information
MikeMcQuaid committed Jul 26, 2024
1 parent d79fa41 commit 42438f4
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 42438f4

Please sign in to comment.