scripts: west_commands: fix help text for flash

The 'command' variable points at a python command object, not a
string. Take its name so the help text for west flash -h correctly
says 'flash' instead of 'debug'.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
Martí Bolívar 2020-02-06 15:21:00 -08:00 committed by Anas Nashif
parent b5bb4cd085
commit cea6e3f17a

View file

@ -122,7 +122,7 @@ def add_parser_common(parser_adder, command):
# This is how we detect if the user provided them or not when
# overriding values from the cached configuration.
command_verb = "flash" if command == "flash" else "debug"
command_verb = "flash" if command.name == "flash" else "debug"
group.add_argument('--board-dir',
help='Zephyr board directory')