Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

m*: Fix Homebrew/NoFileutilsRmrf RuboCop offenses #179163

Merged
merged 27 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
5304b22
mailcatcher: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
85f295e
mako: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
1ddbad1
mariadb: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
bca320c
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
ce4cfde
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
eea392a
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
cff5fba
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
2bb589b
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
db95900
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
2942b07
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
ec8d4bc
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
6c81b6a
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
289e219
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
9093733
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
9f39c57
maven-shell: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
1507583
maven: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
219dabf
mbedtls: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
348a5ea
mbedtls@2: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
20a2d4b
metricbeat: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
18d0460
mikutter: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
2874bb8
minetest: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
61678af
mold: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
b653443
monika: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
8b1eee2
mupdf: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
3cdc5a2
mysql: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
72e0c87
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
d6eb858
[email protected]: Fix `Homebrew/NoFileutilsRmrf` RuboCop offenses
issyl0 Jul 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Formula/m/mailcatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def install
# Remove temporary logs that reference Homebrew shims.
# TODO: See if we can handle this better:
# https://github.com/sparklemotion/sqlite3-ruby/discussions/394
rm_rf libexec/"gems/sqlite3-#{resource("sqlite").version}/ext/sqlite3/tmp"
rm_r(libexec/"gems/sqlite3-#{resource("sqlite").version}/ext/sqlite3/tmp")
end

service do
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/mako.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def install
os = OS.kernel_name.downcase
arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s
libexec.glob("lib/node_modules/@umijs/mako/node_modules/nice-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}" }
end

test do
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/mariadb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mariadb-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mariadb-test")
rm_r(prefix/"sql-bench")

# Link the setup scripts into bin
bin.install_symlink [
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mysql-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mysql-test")
rm_r(prefix/"sql-bench")

# Link the setup scripts into bin
bin.install_symlink [
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mysql-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mysql-test")
rm_r(prefix/"sql-bench")

# Link the setup scripts into bin
bin.install_symlink [
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mysql-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mysql-test")
rm_r(prefix/"sql-bench")

# Link the setup script into bin
bin.install_symlink prefix/"scripts/mysql_install_db"
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mysql-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mysql-test")
rm_r(prefix/"sql-bench")

# Link the setup script into bin
bin.install_symlink prefix/"scripts/mysql_install_db"
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mysql-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mysql-test")
rm_r(prefix/"sql-bench")

# Link the setup script into bin
bin.install_symlink prefix/"scripts/mysql_install_db"
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mysql-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mysql-test")
rm_r(prefix/"sql-bench")

# Link the setup script into bin
bin.install_symlink prefix/"scripts/mysql_install_db"
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mysql-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mysql-test")
rm_r(prefix/"sql-bench")

# Link the setup script into bin
bin.install_symlink prefix/"scripts/mysql_install_db"
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mysql-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mysql-test")
rm_r(prefix/"sql-bench")

# Link the setup scripts into bin
bin.install_symlink [
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mysql-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mysql-test")
rm_r(prefix/"sql-bench")

# Link the setup scripts into bin
bin.install_symlink [
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mariadb-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mariadb-test")
rm_r(prefix/"sql-bench")

# Link the setup scripts into bin
bin.install_symlink [
Expand Down
6 changes: 3 additions & 3 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ def install

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Save space
(prefix/"mariadb-test").rmtree
(prefix/"sql-bench").rmtree
rm_r(prefix/"mariadb-test")
rm_r(prefix/"sql-bench")

# Link the setup scripts into bin
bin.install_symlink [
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/maven-shell.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class MavenShell < Formula

def install
# Remove windows files.
rm_f Dir["bin/*.bat"]
rm(Dir["bin/*.bat"])
libexec.install Dir["*"]
bin.install_symlink libexec/"bin/mvnsh"
end
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/maven.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Maven < Formula

def install
# Remove windows files
rm_f Dir["bin/*.cmd"]
rm(Dir["bin/*.cmd"])

# Fix the permissions on the global settings file.
chmod 0644, "conf/settings.xml"
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/mbedtls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def install
system "cmake", "--install", "build"

# Why does Mbedtls ship with a "Hello World" executable. Let's remove that.
rm_f bin/"hello"
rm(bin/"hello")
# Rename benchmark & selftest, which are awfully generic names.
mv bin/"benchmark", bin/"mbedtls-benchmark"
mv bin/"selftest", bin/"mbedtls-selftest"
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def install
system "cmake", "--install", "build"

# Why does Mbedtls ship with a "Hello World" executable. Let's remove that.
rm_f bin/"hello"
rm(bin/"hello")
# Rename benchmark & selftest, which are awfully generic names.
mv bin/"benchmark", bin/"mbedtls-benchmark"
mv bin/"selftest", bin/"mbedtls-selftest"
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/metricbeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Metricbeat < Formula

def install
# remove non open source files
rm_rf "x-pack"
rm_r("x-pack")

cd "metricbeat" do
# don't build docs because it would fail creating the combined OSS/x-pack
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/mikutter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def install
system "bundle", "install",
"--local", "--path=#{lib}/mikutter/vendor"

rm_rf "vendor"
rm_r("vendor")
(lib/"mikutter").install "plugin"
libexec.install Dir["*"]

Expand Down
2 changes: 1 addition & 1 deletion Formula/m/minetest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def install
inreplace "src/CMakeLists.txt", "fixup_bundle(", "# \\0"

# Remove bundled libraries to prevent fallback
%w[lua gmp jsoncpp].each { |lib| (buildpath/"lib"/lib).rmtree }
%w[lua gmp jsoncpp].each { |lib| rm_r(buildpath/"lib"/lib) }

(buildpath/"games/minetest_game").install resource("minetest_game")
(buildpath/"lib/irrlichtmt").install resource("irrlichtmt")
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/mold.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def install
# This helps make the bottle relocatable.
inreplace "common/config.h.in", "@CMAKE_INSTALL_FULL_LIBDIR@", ""
# Ensure we're using Homebrew-provided versions of these dependencies.
%w[blake3 mimalloc tbb zlib zstd].each { |dir| (buildpath/"third-party"/dir).rmtree }
%w[blake3 mimalloc tbb zlib zstd].each { |dir| rm_r(buildpath/"third-party"/dir) }
args = %w[
-DMOLD_LTO=ON
-DMOLD_USE_MIMALLOC=ON
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/monika.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def install
arch = Hardware::CPU.intel? ? "x64" : Hardware::CPU.arch.to_s
node_modules = libexec/"lib/node_modules/@hyperjumptech/monika/node_modules"
node_modules.glob("nice-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}" }

# Replace universal binaries with native slices.
deuniversalize_machos
Expand Down
2 changes: 1 addition & 1 deletion Formula/m/mupdf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def install
# Remove bundled libraries excluding `extract`, `gumbo-parser` (deprecated), and
# "strongly preferred" `lcms2mt` (lcms2 fork)
keep = %w[extract gumbo-parser lcms2]
(buildpath/"thirdparty").each_child { |path| path.rmtree if keep.exclude? path.basename.to_s }
(buildpath/"thirdparty").each_child { |path| rm_r(path) if keep.exclude? path.basename.to_s }

args = %W[
build=release
Expand Down
4 changes: 2 additions & 2 deletions Formula/m/mysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ def install
end

# Remove the tests directory
rm_rf prefix/"mysql-test"
rm_r(prefix/"mysql-test")

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Fix up the control script and link into bin.
inreplace "#{prefix}/support-files/mysql.server",
Expand Down
4 changes: 2 additions & 2 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ def install
end

# Remove the tests directory
rm_rf prefix/"mysql-test"
rm_r(prefix/"mysql-test")

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Fix up the control script and link into bin.
inreplace "#{prefix}/support-files/mysql.server",
Expand Down
4 changes: 2 additions & 2 deletions Formula/m/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ def install
end

# Remove the tests directory
rm_rf prefix/"mysql-test"
rm_r(prefix/"mysql-test")

# Don't create databases inside of the prefix!
# See: https://github.com/Homebrew/homebrew/issues/4975
rm_rf prefix/"data"
rm_r(prefix/"data")

# Fix up the control script and link into bin.
inreplace "#{prefix}/support-files/mysql.server",
Expand Down
Loading