summaryrefslogtreecommitdiff
path: root/deps/rabbitmq_cli/lib/rabbitmq/cli/core/merges_default_virtual_host.ex
diff options
context:
space:
mode:
Diffstat (limited to 'deps/rabbitmq_cli/lib/rabbitmq/cli/core/merges_default_virtual_host.ex')
-rw-r--r--deps/rabbitmq_cli/lib/rabbitmq/cli/core/merges_default_virtual_host.ex15
1 files changed, 15 insertions, 0 deletions
diff --git a/deps/rabbitmq_cli/lib/rabbitmq/cli/core/merges_default_virtual_host.ex b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/merges_default_virtual_host.ex
new file mode 100644
index 0000000000..94b1b768b6
--- /dev/null
+++ b/deps/rabbitmq_cli/lib/rabbitmq/cli/core/merges_default_virtual_host.ex
@@ -0,0 +1,15 @@
+## This Source Code Form is subject to the terms of the Mozilla Public
+## License, v. 2.0. If a copy of the MPL was not distributed with this
+## file, You can obtain one at https://mozilla.org/MPL/2.0/.
+##
+## Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved.
+
+# Should be used by commands that require rabbit app to be stopped
+# but need no other execution environment validators.
+defmodule RabbitMQ.CLI.Core.MergesDefaultVirtualHost do
+ defmacro __using__(_) do
+ quote do
+ def merge_defaults(args, opts), do: {args, Map.merge(%{vhost: "/"}, opts)}
+ end
+ end
+end