diff --git a/Formula/b/balena-cli.rb b/Formula/b/balena-cli.rb index 747dc1a66d8c..9d95f1ca2682 100644 --- a/Formula/b/balena-cli.rb +++ b/Formula/b/balena-cli.rb @@ -42,10 +42,10 @@ def install arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s node_modules = libexec/"lib/node_modules/balena-cli/node_modules" node_modules.glob("{ffi-napi,ref-napi}/prebuilds/*") - .each { |dir| dir.rmtree if dir.basename.to_s != "#{os}-#{arch}" } + .each { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } - (node_modules/"lzma-native/build").rmtree - (node_modules/"usb").rmtree if OS.linux? + rm_r(node_modules/"lzma-native/build") + rm_r(node_modules/"usb") if OS.linux? # Replace universal binaries with native slices deuniversalize_machos diff --git a/Formula/b/bamtools.rb b/Formula/b/bamtools.rb index 170421ecad6f..f5fc928ce6af 100644 --- a/Formula/b/bamtools.rb +++ b/Formula/b/bamtools.rb @@ -28,7 +28,7 @@ class Bamtools < Formula def install # Delete bundled jsoncpp to avoid fallback - (buildpath/"src/third_party/jsoncpp").rmtree + rm_r(buildpath/"src/third_party/jsoncpp") # Build shared library system "cmake", "-S", ".", "-B", "build_shared", diff --git a/Formula/b/basex.rb b/Formula/b/basex.rb index 62072e92212c..12e3bb9a24be 100644 --- a/Formula/b/basex.rb +++ b/Formula/b/basex.rb @@ -25,9 +25,9 @@ class Basex < Formula def install rm Dir["bin/*.bat"] - rm_rf "repo" - rm_rf "data" - rm_rf "etc" + rm_r("repo") + rm_r("data") + rm_r("etc") libexec.install Dir["*"] bin.install Dir["#{libexec}/bin/*"] diff --git a/Formula/b/bee.rb b/Formula/b/bee.rb index 5ead02d12b35..8e1dda0e0e64 100644 --- a/Formula/b/bee.rb +++ b/Formula/b/bee.rb @@ -18,7 +18,7 @@ class Bee < Formula depends_on "openjdk" def install - rm_rf Dir["bin/*.bat"] + rm_r(Dir["bin/*.bat"]) libexec.install Dir["*"] (bin/"bee").write_env_script libexec/"bin/bee", Language::Java.java_home_env end diff --git a/Formula/b/benerator.rb b/Formula/b/benerator.rb index a5541b1b827a..cf38375e9734 100644 --- a/Formula/b/benerator.rb +++ b/Formula/b/benerator.rb @@ -14,7 +14,7 @@ class Benerator < Formula def install # Remove unnecessary files - rm_f Dir["bin/*.bat", "bin/pom.xml"] + rm(Dir["bin/*.bat", "bin/pom.xml"]) # Installs only the "bin" and "lib" directories from the tarball libexec.install Dir["bin", "lib"] diff --git a/Formula/b/bit.rb b/Formula/b/bit.rb index 6367da7897a1..35fb6cd1ed8f 100644 --- a/Formula/b/bit.rb +++ b/Formula/b/bit.rb @@ -39,11 +39,11 @@ def install arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s node_modules = libexec/"lib/node_modules/bit-bin/node_modules" (node_modules/"leveldown/prebuilds/linux-x64/node.napi.musl.node").unlink - (node_modules/"leveldown/prebuilds").each_child { |dir| dir.rmtree if dir.basename.to_s != "#{os}-#{arch}" } + (node_modules/"leveldown/prebuilds").each_child { |dir| rm_r(dir) if dir.basename.to_s != "#{os}-#{arch}" } # Remove vendored pre-built binary `terminal-notifier` node_notifier_vendor_dir = node_modules/"node-notifier/vendor" - node_notifier_vendor_dir.rmtree # remove vendored pre-built binaries + rm_r(node_notifier_vendor_dir) # remove vendored pre-built binaries if OS.mac? terminal_notifier_dir = node_notifier_vendor_dir/"mac.noindex" diff --git a/Formula/b/bloaty.rb b/Formula/b/bloaty.rb index 3105e94192e1..6ee46ed719d8 100644 --- a/Formula/b/bloaty.rb +++ b/Formula/b/bloaty.rb @@ -34,7 +34,7 @@ def install # https://github.com/protocolbuffers/protobuf/issues/9947 ENV.append_to_cflags "-DNDEBUG" # Remove vendored dependencies - %w[abseil-cpp capstone protobuf re2].each { |dir| (buildpath/"third_party"/dir).rmtree } + %w[abseil-cpp capstone protobuf re2].each { |dir| rm_r(buildpath/"third_party"/dir) } abseil_cxx_standard = 17 # Keep in sync with C++ standard in abseil.rb inreplace "CMakeLists.txt", "CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD #{abseil_cxx_standard}" inreplace "CMakeLists.txt", "-std=c++11", "-std=c++17" diff --git a/Formula/b/byteman.rb b/Formula/b/byteman.rb index bfe6de8bbe83..85442e58a6b5 100644 --- a/Formula/b/byteman.rb +++ b/Formula/b/byteman.rb @@ -24,7 +24,7 @@ class Byteman < Formula depends_on "openjdk" def install - rm_rf Dir["bin/*.bat"] + rm_r(Dir["bin/*.bat"]) doc.install Dir["docs/*"], "README" libexec.install ["bin", "lib", "contrib"] pkgshare.install ["sample"]