Skip to content

Commit e026aed

Browse files
author
Loïc Hoguin
committed
fixup! Fix rabbitmq-diagnostics remote_shell for 26.0
1 parent 6f9e580 commit e026aed

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

deps/rabbitmq_cli/lib/rabbitmq/cli/diagnostics/commands/remote_shell_command.ex

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,20 @@ defmodule RabbitMQ.CLI.Diagnostics.Commands.RemoteShellCommand do
1313

1414
def run([], %{node: node_name}) do
1515
_ = :c.l(:shell)
16+
1617
if :erlang.function_exported(:shell, :start_interactive, 1) do
17-
:shell.start_interactive({node_name, :shell, :start, []})
18-
:timer.sleep(:infinity)
18+
:shell.start_interactive({node_name, :shell, :start, []})
19+
:timer.sleep(:infinity)
1920
else
20-
_ = Supervisor.terminate_child(:kernel_sup, :user)
21-
Process.flag(:trap_exit, true)
22-
user_drv = :user_drv.start(['tty_sl -c -e', {node_name, :shell, :start, []}])
23-
Process.link(user_drv)
24-
25-
receive do
26-
{'EXIT', _user_drv, _} ->
27-
{:ok, "Disconnected from #{node_name}."}
28-
end
21+
_ = Supervisor.terminate_child(:kernel_sup, :user)
22+
Process.flag(:trap_exit, true)
23+
user_drv = :user_drv.start(['tty_sl -c -e', {node_name, :shell, :start, []}])
24+
Process.link(user_drv)
25+
26+
receive do
27+
{'EXIT', _user_drv, _} ->
28+
{:ok, "Disconnected from #{node_name}."}
29+
end
2930
end
3031
end
3132

deps/rabbitmq_cli/mix.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,18 +185,21 @@ defmodule RabbitMQCtl.MixfileBase do
185185
"deps.compile"
186186
],
187187
make_app: [
188+
"format --check-formatted",
188189
"compile",
189190
"escript.build"
190191
],
191192
make_all: [
192193
"deps.get",
193194
"deps.compile",
195+
"format --check-formatted",
194196
"compile",
195197
"escript.build"
196198
],
197199
make_all_in_src_archive: [
198200
"deps.get --only prod",
199201
"deps.compile",
202+
"format --check-formatted",
200203
"compile",
201204
"escript.build"
202205
]

0 commit comments

Comments
 (0)