Skip to content

Commit 0457425

Browse files
committed
[email protected]: remove unused args
1 parent 67ef5b3 commit 0457425

File tree

1 file changed

+24
-11
lines changed

1 file changed

+24
-11
lines changed

Formula/m/[email protected]

+24-11
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,13 @@ def install
103103
-DOPENSSL_ROOT_DIR=#{Formula["openssl@3"].opt_prefix}
104104
-DWITH_ICU=#{icu4c.opt_prefix}
105105
-DWITH_SYSTEM_LIBS=ON
106-
-DWITH_BOOST=boost
107106
-DWITH_EDITLINE=system
108-
-DWITH_LIBEVENT=system
109107
-DWITH_LZ4=system
110108
-DWITH_PROTOBUF=system
111109
-DWITH_SSL=system
112110
-DWITH_ZLIB=system
113111
-DWITH_ZSTD=system
114112
-DWITH_UNIT_TESTS=OFF
115-
-DWITH_INNODB_MEMCACHED=ON
116113
]
117114

118115
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
@@ -133,13 +130,13 @@ def install
133130
bin.install_symlink prefix/"support-files/mysql.server"
134131

135132
# Install my.cnf that binds to 127.0.0.1 by default
136-
(buildpath/"my.cnf").write <<~EOS
133+
(buildpath/"my.cnf").write <<~INI
137134
# Default Homebrew MySQL server config
138135
[mysqld]
139136
# Only allow connections from localhost
140137
bind-address = 127.0.0.1
141138
mysqlx-bind-address = 127.0.0.1
142-
EOS
139+
INI
143140
etc.install "my.cnf"
144141
end
145142

@@ -187,17 +184,33 @@ def caveats
187184
(testpath/"mysql").mkpath
188185
(testpath/"tmp").mkpath
189186

190-
args = %W[--no-defaults --user=#{ENV["USER"]} --datadir=#{testpath}/mysql --tmpdir=#{testpath}/tmp]
191-
system bin/"mysqld", *args, "--initialize-insecure", "--basedir=#{prefix}"
192187
port = free_port
193-
pid = spawn(bin/"mysqld", *args, "--port=#{port}")
188+
socket = testpath/"mysql.sock"
189+
mysqld_args = %W[
190+
--no-defaults
191+
--mysqlx=OFF
192+
--user=#{ENV["USER"]}
193+
--port=#{port}
194+
--socket=#{socket}
195+
--basedir=#{prefix}
196+
--datadir=#{testpath}/mysql
197+
--tmpdir=#{testpath}/tmp
198+
]
199+
client_args = %W[
200+
--port=#{port}
201+
--socket=#{socket}
202+
--user=root
203+
--password=
204+
]
205+
206+
system bin/"mysqld", *mysqld_args, "--initialize-insecure"
207+
pid = spawn(bin/"mysqld", *mysqld_args)
194208
begin
195209
sleep 5
196-
197-
output = shell_output("#{bin}/mysql --port=#{port} --user=root --password= --execute='show databases;'")
210+
output = shell_output("#{bin}/mysql #{client_args.join(" ")} --execute='show databases;'")
198211
assert_match "information_schema", output
199-
system bin/"mysqladmin", "--port=#{port}", "--user=root", "--password=", "shutdown"
200212
ensure
213+
system bin/"mysqladmin", *client_args, "shutdown"
201214
Process.kill "TERM", pid
202215
end
203216
end

0 commit comments

Comments
 (0)