We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fed282f commit 7f52d47Copy full SHA for 7f52d47
1 file changed
deps/rabbitmq_cli/lib/rabbitmq/cli/queues/commands/grow_to_count_command.ex
@@ -21,12 +21,19 @@ defmodule RabbitMQ.CLI.Queues.Commands.GrowToCountCommand do
21
errors_only: :boolean
22
]
23
24
- def merge_defaults([], opts) do
25
- {[], Map.merge(default_opts(), opts)}
26
- end
+ def merge_defaults(args, opts) do
+ args =
+ case args do
27
+ [n | rem] when is_binary(n) ->
28
+ case Integer.parse(n) do
29
+ {i, ""} -> [i | rem]
30
+ _ -> args
31
+ end
32
+
33
+ _ ->
34
+ args
35
36
- def merge_defaults([node_count | rem], opts) do
- args = [String.to_integer(node_count) | rem]
37
{args, Map.merge(default_opts(), opts)}
38
end
39
0 commit comments