Skip to content

Commit

Permalink
Merge pull request #150 from pecan/bare-cli-help
Browse files Browse the repository at this point in the history
fix a CLI parsing bug (when no command is provided)
  • Loading branch information
ryanpetrello committed Jul 14, 2023
2 parents 20466af + 140fdf1 commit 28a1ffa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pecan/commands/base.py
Expand Up @@ -86,6 +86,9 @@ def parse_sub_commands(self):

def run(self, args):
ns = self.parser.parse_args(args)
if ns.command_name is None:
self.run(['--help'])
return
self.commands[ns.command_name]().run(ns)

@classmethod
Expand Down

0 comments on commit 28a1ffa

Please sign in to comment.