Allow passing service root path via command line.
This commit is contained in:
parent
4837b70073
commit
84695c5410
11
doxy/cli.py
11
doxy/cli.py
|
@ -38,9 +38,18 @@ def complete_service_name(ctx, param, incomplete):
|
||||||
show_default=True,
|
show_default=True,
|
||||||
help="output formatting",
|
help="output formatting",
|
||||||
)
|
)
|
||||||
|
@click.option(
|
||||||
|
"--service-root",
|
||||||
|
"-r",
|
||||||
|
type=click.Path(exists=True, file_okay=False, dir_okay=True),
|
||||||
|
default=Path(CONFIG.root_directory),
|
||||||
|
help="Service root directory",
|
||||||
|
show_default=True,
|
||||||
|
)
|
||||||
@click.pass_context
|
@click.pass_context
|
||||||
def main(ctx, format):
|
def main(ctx, format, service_root):
|
||||||
ctx.ensure_object(dict)
|
ctx.ensure_object(dict)
|
||||||
|
CONFIG.root_directory = service_root
|
||||||
ctx.obj["CONFIG"] = CONFIG
|
ctx.obj["CONFIG"] = CONFIG
|
||||||
ctx.obj["FORMAT"] = format.lower()
|
ctx.obj["FORMAT"] = format.lower()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue