Skip to content

Commit

Permalink
mbed: config: print detailed help in subcommand
Browse files Browse the repository at this point in the history
Print detailed usage when unsupported arguments are supplied
with mbed config subcommand
  • Loading branch information
Naveen Kaje committed Mar 6, 2019
1 parent 52ed388 commit bd12d9a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -3249,9 +3249,13 @@ def config_(var=None, value=None, global_cfg=False, unset=False, list_config=Fal
action('%s now set as default %s in program "%s"' % (value, name, program.name))
else:
value = program.get_cfg(var)
action(('%s' % value) if value else 'No default %s set in program "%s"' % (name, program.name))
if value:
action('%s' % value)
else:
action('No default %s set in program "%s"' % (name, program.name))
error("run with -h for detailed usage help")
else:
subcommands['config'].error("too few arguments")
error("Too few arguments. Run with -h for detailed help")


# Build system and exporters
Expand Down

0 comments on commit bd12d9a

Please sign in to comment.