From 2b810c9bee90ca4fa5c219d1b6c1d24fae8dd401 Mon Sep 17 00:00:00 2001 From: Tim Riley Date: Fri, 30 Oct 2026 11:04:51 +1100 Subject: [PATCH] Use new `Dry::CLI.accepted_kwargs` public API --- lib/hanami/cli/commands/app/command.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/hanami/cli/commands/app/command.rb b/lib/hanami/cli/commands/app/command.rb index b09edbb6..240da726 100644 --- a/lib/hanami/cli/commands/app/command.rb +++ b/lib/hanami/cli/commands/app/command.rb @@ -35,9 +35,10 @@ def call(*args, **opts) ENV["HANAMI_ENV"] = hanami_env Hanami::Env.load - # Pass only the params that the command's own `#call` declares, as Dry::CLI would if - # this module's `#call` were not in the way. - super(*args, **Dry::CLI::Dispatch.args_for(method(:call).super_method, opts)) + # Find the next `#call` after this wrapper, and pass only the keyword args that it + # accepts, as Dry CLI would if this module's `#call` were not in the way. + next_call = Environment.instance_method(:call).bind(self).super_method + super(*args, **Dry::CLI.accepted_kwargs(next_call, opts)) end end