diff --git a/Formula/r/rabbitmq.rb b/Formula/r/rabbitmq.rb index 309abc94e7b9..4d0739151207 100644 --- a/Formula/r/rabbitmq.rb +++ b/Formula/r/rabbitmq.rb @@ -1,8 +1,8 @@ class Rabbitmq < Formula desc "Messaging and streaming broker" homepage "https://www.rabbitmq.com" - url "https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.13.7/rabbitmq-server-generic-unix-3.13.7.tar.xz" - sha256 "45e5423c43f15c9d2b6ee5947f8e4f256fcfa0c1e7743e60c473cd006954e1fa" + url "https://github.com/rabbitmq/rabbitmq-server/releases/download/v4.0.1/rabbitmq-server-generic-unix-4.0.1.tar.xz" + sha256 "5614c6f47d62dbe920843e915dc1d66cdd0097ec27617bbe05c1c3b588098485" license "MPL-2.0" livecheck do @@ -50,7 +50,12 @@ def install "rabbitmq_mqtt,rabbitmq_stream]." end - sbin.install prefix/"plugins/rabbitmq_management-#{version}/priv/www/cli/rabbitmqadmin" + rabbitmqadmin = prefix.glob("plugins/rabbitmq_management-*/priv/www/cli/rabbitmqadmin") + if (rabbitmqadmin_count = rabbitmqadmin.count) > 1 + odie "Expected only one `rabbitmqadmin`, got #{rabbitmqadmin_count}" + end + + sbin.install rabbitmqadmin (sbin/"rabbitmqadmin").chmod 0755 generate_completions_from_executable(sbin/"rabbitmqadmin", "--bash-completion", shells: [:bash], base_name: "rabbitmqadmin", shell_parameter_format: :none)