Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doubly nested subcommand creates wrong help output #627

Open
Gargron opened this issue Oct 9, 2018 · 2 comments
Open

Doubly nested subcommand creates wrong help output #627

Gargron opened this issue Oct 9, 2018 · 2 comments

Comments

@Gargron
Copy link

Gargron commented Oct 9, 2018

Ref mastodon/mastodon#8920

module Mastodon
  class CLI < Thor
    desc 'settings SUBCOMMAND ...ARGS', 'Manage dynamic settings'
    subcommand 'settings', Mastodon::SettingsCLI
  end

  class RegistrationsCLI < Thor
    desc 'open', 'Open registrations'
    def open
    end

    desc 'close', 'Close registrations'
    def close
    end
  end

  class SettingsCLI < Thor
    desc 'registrations SUBCOMMAND ...ARGS', 'Manage state of registrations'
    subcommand 'registrations', RegistrationsCLI
  end
end

Expected output of settings registrations help would point to settings registrations open, but instead only points to registrations open, which cannot be executed.

@hostingnuggets
Copy link

Same issue here... or is nested subcommands not supported? I did not find any documentation either in the wiki mentioning nested subcommands.

@jeffreycoe
Copy link

Just came across this issue, too. The link below has some additional details on the behavior we found: https://stackoverflow.com/questions/63331208/creating-nested-subcommands-using-thor/63341356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants