File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
deps/rabbitmq_cli/lib/rabbitmq/cli/core Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ defmodule RabbitMQ.CLI.Core.CommandModules do
1111
1212 import RabbitMQ.CLI.Core.CodePath
1313
14- @ commands_ns ~r / RabbitMQ.CLI.(.*).Commands/
14+ @ commands_ns ~S " RabbitMQ.CLI.(.*).Commands"
1515
1616 def module_map ( opts \\ % { } ) do
1717 Application . get_env ( :rabbitmqctl , :commands ) || load ( opts )
@@ -130,7 +130,7 @@ defmodule RabbitMQ.CLI.Core.CommandModules do
130130 end
131131
132132 defp make_module_map ( modules , scope ) when modules != nil do
133- commands_ns = Regex . recompile !( @ commands_ns )
133+ commands_ns = Regex . compile !( @ commands_ns )
134134
135135 modules
136136 |> Enum . filter ( fn mod ->
@@ -212,7 +212,7 @@ defmodule RabbitMQ.CLI.Core.CommandModules do
212212 defp command_scopes ( cmd ) do
213213 case CommandBehaviour . scopes ( cmd ) do
214214 nil ->
215- Regex . recompile !( @ commands_ns )
215+ Regex . compile !( @ commands_ns )
216216 |> Regex . run ( to_string ( cmd ) , capture: :all_but_first )
217217 |> List . first ( )
218218 |> to_snake_case
Original file line number Diff line number Diff line change 77defmodule RabbitMQ.CLI.Core.OsPid do
88 @ external_process_check_interval 1000
99
10- @ pid_regex ~r / ^\s *(?<pid>\d +)/
10+ @ pid_regex ~S " ^\s*(?<pid>\d+)"
1111
1212 #
1313 # API
@@ -27,7 +27,7 @@ defmodule RabbitMQ.CLI.Core.OsPid do
2727 def read_pid_from_file ( pidfile_path , should_wait ) do
2828 case { :file . read_file ( pidfile_path ) , should_wait } do
2929 { { :ok , contents } , _ } ->
30- pid_regex = Regex . recompile !( @ pid_regex )
30+ pid_regex = Regex . compile !( @ pid_regex )
3131
3232 case Regex . named_captures ( pid_regex , contents ) [ "pid" ] do
3333 # e.g. the file is empty
You can’t perform that action at this time.
0 commit comments