From e8f9dfc3e9b69a3b24ead20a310edb0fef5cc90e Mon Sep 17 00:00:00 2001 From: Bo Anderson Date: Wed, 16 Apr 2025 16:22:36 +0100 Subject: [PATCH] mktemp: drop include FileUtils --- Library/Homebrew/mktemp.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Library/Homebrew/mktemp.rb b/Library/Homebrew/mktemp.rb index d01edae9a5..989d904d20 100644 --- a/Library/Homebrew/mktemp.rb +++ b/Library/Homebrew/mktemp.rb @@ -5,8 +5,6 @@ # Each instance is only intended to be used once. # Can also be used to create a temporary directory with the brew instance's group. class Mktemp - include FileUtils - # Path to the tmpdir used in this run sig { returns(T.nilable(Pathname)) } attr_reader :tmpdir @@ -106,11 +104,11 @@ class Mktemp sig { params(path: Pathname).void } def chmod_rm_rf(path) if path.directory? && !path.symlink? - chmod("u+rw", path) if path.owned? # Need permissions in order to see the contents + FileUtils.chmod("u+rw", path) if path.owned? # Need permissions in order to see the contents path.children.each { |child| chmod_rm_rf(child) } - rmdir(path) + FileUtils.rmdir(path) else - rm_f(path) + FileUtils.rm_f(path) end rescue nil # Just skip this directory.