Skip to content
Snippets Groups Projects
Commit 9bba6997 authored by Hans Fangohr's avatar Hans Fangohr
Browse files

Merge branch 'improve-help-string' into 'review-argument-parsing'

Specify expanded toolchain help for all commands.

See merge request mpsd-cs/mpsd-software-environments!8
parents a6860278 d5c14fe5
No related branches found
No related tags found
3 merge requests!19Move linux-debian11 into main,!8Specify expanded toolchain help for all commands.,!7Review command line argument parsing
Pipeline #367930 passed
...@@ -386,15 +386,14 @@ def main(): ...@@ -386,15 +386,14 @@ def main():
) )
if cmd in ["install", "reinstall", "remove"]: if cmd in ["install", "reinstall", "remove"]:
# "install" command needs additional documentation # "install" command needs additional documentation
if cmd == "install": tool_chain_help = (
help_part2 = ( f"Pass a list of toolchains to command {cmd}. "
"Use '--toolchains ALL' to " "Use '--toolchains ALL' to "
"install all toolchains. If '--toolchain' is not " f"{cmd} all toolchains. If '--toolchain' is not "
"specified, list available toolchains for the release " "specified, list available toolchains for the release "
"(after environment has been prepared if not done yet)." "(after environment has been prepared if not done yet)."
) )
else:
help_part2 = ""
subp.add_argument( subp.add_argument(
"--toolchains", # first option defines attribute "--toolchains", # first option defines attribute
# name `args.toolchains` in `args = parser_args()` # name `args.toolchains` in `args = parser_args()`
...@@ -404,7 +403,7 @@ def main(): ...@@ -404,7 +403,7 @@ def main():
dest="toolchains", dest="toolchains",
nargs="+", nargs="+",
default="NONE", default="NONE",
help=f"List of toolchains to {cmd}. " + help_part2, help=tool_chain_help,
) )
subp.add_argument( subp.add_argument(
"--enable-build-cache", "--enable-build-cache",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment