Skip to content

Commit

Permalink
Define package_name for subcommand classes (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzaakiirr authored Jan 21, 2025
1 parent 70437e5 commit 5fb652b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/cpflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ def self.klass_for(subcommand_name)

@commands_with_required_options = []
@commands_with_extra_options = []
cli_package_name = @package_name

::Command::Base.common_options.each do |option|
params = process_option_params(option[:params])
Expand Down Expand Up @@ -214,6 +215,7 @@ def self.klass_for(subcommand_name)
klass = subcommand_name ? klass_for(subcommand_name) : self

klass.class_eval do
package_name(cli_package_name) if subcommand_name
desc(usage, description, hide: hide)
long_desc(long_description)

Expand Down

0 comments on commit 5fb652b

Please sign in to comment.