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
11
11
12
12
import RabbitMQ.CLI.Core.CodePath
13
13
14
- @ commands_ns ~r / RabbitMQ.CLI.(.*).Commands/
14
+ @ commands_ns ~S " RabbitMQ.CLI.(.*).Commands"
15
15
16
16
def module_map ( opts \\ % { } ) do
17
17
Application . get_env ( :rabbitmqctl , :commands ) || load ( opts )
@@ -130,7 +130,7 @@ defmodule RabbitMQ.CLI.Core.CommandModules do
130
130
end
131
131
132
132
defp make_module_map ( modules , scope ) when modules != nil do
133
- commands_ns = Regex . recompile !( @ commands_ns )
133
+ commands_ns = Regex . compile !( @ commands_ns )
134
134
135
135
modules
136
136
|> Enum . filter ( fn mod ->
@@ -212,7 +212,7 @@ defmodule RabbitMQ.CLI.Core.CommandModules do
212
212
defp command_scopes ( cmd ) do
213
213
case CommandBehaviour . scopes ( cmd ) do
214
214
nil ->
215
- Regex . recompile !( @ commands_ns )
215
+ Regex . compile !( @ commands_ns )
216
216
|> Regex . run ( to_string ( cmd ) , capture: :all_but_first )
217
217
|> List . first ( )
218
218
|> to_snake_case
Original file line number Diff line number Diff line change 7
7
defmodule RabbitMQ.CLI.Core.OsPid do
8
8
@ external_process_check_interval 1000
9
9
10
- @ pid_regex ~r / ^\s *(?<pid>\d +)/
10
+ @ pid_regex ~S " ^\s*(?<pid>\d+)"
11
11
12
12
#
13
13
# API
@@ -27,7 +27,7 @@ defmodule RabbitMQ.CLI.Core.OsPid do
27
27
def read_pid_from_file ( pidfile_path , should_wait ) do
28
28
case { :file . read_file ( pidfile_path ) , should_wait } do
29
29
{ { :ok , contents } , _ } ->
30
- pid_regex = Regex . recompile !( @ pid_regex )
30
+ pid_regex = Regex . compile !( @ pid_regex )
31
31
32
32
case Regex . named_captures ( pid_regex , contents ) [ "pid" ] do
33
33
# e.g. the file is empty
You can’t perform that action at this time.
0 commit comments