From a63408c8cf3f99646be2b375f651d6cf417f7ae0 Mon Sep 17 00:00:00 2001 From: philippeitis <33013301+philippeitis@users.noreply.github.com> Date: Wed, 4 Mar 2020 13:16:35 -0800 Subject: [PATCH] Handle case where only options are passed. --- jc/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jc/cli.py b/jc/cli.py index 7edd1895..4628a596 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -209,6 +209,10 @@ def magic(): else: break + if len(args_given) == 0: + # This was a call to jc with just options and no commands. + return + # find the command and parser command = ' '.join(args_given[0:2]) for parser in parser_info: