Skip to content

Commit

Permalink
Reject --experimental all
Browse files Browse the repository at this point in the history
  • Loading branch information
mkuratczyk committed Aug 19, 2024
1 parent 0fc23b2 commit bd6f1b5
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,15 @@ defmodule RabbitMQ.CLI.Ctl.Commands.EnableFeatureFlagCommand do

use RabbitMQ.CLI.Core.RequiresRabbitAppRunning

def run(["all"], %{node: node_name}) do
case :rabbit_misc.rpc_call(node_name, :rabbit_feature_flags, :enable_all, []) do
{:badrpc, _} = err -> err
other -> other
def run(["all"], %{node: node_name, experimental: experimental}) do
case experimental do
true ->
{:error, RabbitMQ.CLI.Core.ExitCodes.exit_usage(), "`--experiemntal` flag is not allowed when enabling all feature flags.\nUse --experimental with a specific feature flag if you want to enable an experimental feature."}
false ->
case :rabbit_misc.rpc_call(node_name, :rabbit_feature_flags, :enable_all, []) do
{:badrpc, _} = err -> err
other -> other
end
end
end

Expand Down

0 comments on commit bd6f1b5

Please sign in to comment.