mirror of
https://github.com/docker/docs.git
synced 2026-04-12 14:25:46 +07:00
Show help banner if no command given
This commit is contained in:
@@ -28,6 +28,9 @@ class DocoptCommand(object):
|
||||
options = docopt_full_help(getdoc(self), argv, **self.docopt_options())
|
||||
command = options['COMMAND']
|
||||
|
||||
if command is None:
|
||||
raise SystemExit(getdoc(self))
|
||||
|
||||
if not hasattr(self, command):
|
||||
raise NoSuchCommand(command, self)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user